简体   繁体   English

pycharm interperter 和安装包的问题

[英]problem with pycharm interperter and installing packages

I have a problem with installing packages in my pycharm project.我在 pycharm 项目中安装软件包时遇到问题。

Until today everything worked perfectly, I could install packages and everything worked.直到今天一切正常,我可以安装软件包并且一切正常。 I didn't change anything but now everytime I try to install new package I get an error我没有改变任何东西,但现在每次我尝试安装新的 package 时都会出现错误

pycharm message 1 pycharm 消息 1

pycharm message 2 pycharm 消息 2

But I do have pip installed in python interpreter interpreter packages但我确实在 python 解释器解释器包中安装了 pip

I'm trying to understand what is the problem and how to fix it.我正在尝试了解问题所在以及如何解决。 I'm not sure if this is the problem, but the interpreter is python 3.7 and the weird thing is when I'm checking the version on my cmd it's 3.8.3 but when I checked on Windows's apps it showed python 3.7.3我不确定这是否是问题所在,但解释器是 python 3.7,奇怪的是,当我检查 cmd 上的版本时,它是 3.8.3,但是当我检查 Windows 的应用程序时,它显示 Z23EEEB4347BDD7556DFC 33EEEB4347BDD256DDA。

python version from cmd python 版本来自 cmd

Is there a reason it happened just randomly after it worked perfectly in the last couple of weeks I worked on the program?在我从事该程序的最后几周完美运行之后,它随机发生是否有原因?

You can try few things你可以尝试几件事

  1. Running same command in terminal.在终端中运行相同的命令。 If it doesn't work then please locate your pip.exe which is generally in the Scripts folder right next to python.exe .如果它不起作用,请找到您的pip.exe ,它通常位于python.exe旁边的Scripts文件夹中。 Make sure the path/to/folder is in environment variables确保path/to/folderenvironment variables

  2. Reset project settings.重置项目设置。 Try deleting .idea directory in your project.尝试删除项目中的.idea目录。 This folder is created by pycharm to save settings.此文件夹由pycharm创建,用于保存设置。 Open the project folder again in pycharm and set the interpreter.在 pycharm 中再次打开项目文件夹并设置解释器。

Did you try to install directly with pip in the terminal?您是否尝试在终端中直接使用 pip 安装? If it doesn't work maybe you should reinstall it如果它不起作用,也许你应该重新安装它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM