“安装” pip 在 Pycharm 失败,但在 Jupyternotebook 工作。为什么?
我只是 Python 的超级初学者。我正在寻求帮助。
我的目标是通过 Pycharm 安装“selenium”。 我尝试过这种方法:
pip install selenium
我的 Pycharm 能够识别“pip”,但不能识别“install”。
我尝试了多种方法来解决这个问题。
- 使用Python3.9解释器(失败)
- 使用Conda解释器(失败)
- 重新安装pip(失败)
- 安装selenium @ Jupyternotebook(工作)
- 通过Pycharm解释器设置直接添加包(工作)
I some how figured it out through the two methods below, but I would like to make *'pip'* working on my Pycharm. And I think this is the problem of **path setting**, because *'pip install'* worked at Jupyternotebook. Does anybody have solution to this situation?
. Operating System : MacOS
Conda Path : /Users/****/opt/anaconda3/envs/pythonProject/bin/python
Python Path : /usr/local/bin/python3.9
I'm only super beginner using Python. And I'm looking for help.
My objective is to install 'selenium' through Pycharm.
I've tried this method:
pip install selenium
My Pycharm was able to recognize 'pip' but not 'install'.
I've tried several methods to solve this.
- Using Python3.9 interpreter (failed)
- Using Conda interpreter (failed)
- re-installing pip (failed)
- installing selenium @ Jupyternotebook (worked)
- directly adding the package through Pycharm Interpreter settings (worked)
I some how figured it out through the two methods below, but I would like to make *'pip'* working on my Pycharm. And I think this is the problem of **path setting**, because *'pip install'* worked at Jupyternotebook. Does anybody have solution to this situation?
.
Operating System : MacOS
Conda Path : /Users/****/opt/anaconda3/envs/pythonProject/bin/python
Python Path : /usr/local/bin/python3.9
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您安装了多个 python,其中一个在 jupyter-notebook 内核中使用,一个在 pycharm 中使用,一个在 conda 环境中使用。您可以为所有这些 python 安装 pip。
您可以通过以下方式在 pycharm 设置中检查 pycharm python 解释器:PyCharm |偏好 |项目| Python 解释器。您还可以将 PyCharm 设置为使用 jupyter-notebook 正在使用的 python。 jupyter-notebook 内核可以通过以下方式查看:
jupyter kernelspec list
You have multiple pythons installed, one that is being used in the jupyter-notebook kernel, one in pycharm, and one in the conda environment. You could install pip for all these pythons.
You can check you pycharm python interpreter in pycharm settings by following: PyCharm | Preferences | Project | Python Interpreter. And you can also set PyCharm to use the python that jupyter-notebook is using. jupyter-notebook kernels can be viewed via:
jupyter kernelspec list