问题描述
我正在使用 python 3.6.5 和 PyCharm.
I am using python 3.6.5 with PyCharm.
在尝试安装任何软件包时,它会给出错误"尝试从系统终端运行此命令.确保使用为位于 'C:projectPathvenvScriptspython.exe' 的 Python 解释器安装的正确版本的 'pip'"
While trying to install any package, it gives the error"Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:projectPathvenvScriptspython.exe'"
项目路径和实际安装的python路径不同.
Project path and actual python installed paths are different.
在 PyCharm 的设置中,pip 版本为 19.0.3,最新版本为 19.3.1
In settings of PyCharm, pip version is 19.0.3 and latest version is 19.3.1
另外,命令提示符中的python -m pip --version"表示 pip 版本是 9.0.3
Also, "python -m pip --version" from command prompt says pip version is 9.0.3
我该怎么办?
推荐答案
我想你的系统中安装了不止一个 Python.你应该去 Pycharm --> 文件> 设置> 项目> 项目解释器.
I imagine that you have more than one Python installed in your system.you should go to Pycharm --> file> settings> project>project interpreter.
您应该在您的系统上找到另一个 Python 实例,并尝试将您的解释器更改为那个.如果它没有出现在列表中,请单击项目解释器前面看起来像星号的按钮.
you should find the other Python instance on your system and try to change your interpreter to that one.if it does not appear in the list click on the button that looks like star in front of the project interpreter.
我遇到了同样的问题.我意识到我自己安装了一个python,另一个是在安装PyCharm时安装的.
I had the same problem.I realized that I installed one python by myself and another is installed while installing PyCharm.
更换解释器后,我不再收到该错误.
After changing my interpreter I do not receive that error anymore.
这篇关于确保您使用为位于 'dir:projectPathvenvScriptspython.exe' 的 Python 解释器安装的正确版本的 'pip'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!