[英]python is not recognized as an internal or external command, operable program or batch file
[英]CMD is not recognized python modules as an internal or external command, operable program or batch file
当我尝试使用pip install
安装任何模块时,cmd/vscode 返回此消息(我尝试使用不同的模块)
C:\>pip install solc-select
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
Requirement already satisfied: solc-select in c:\python310\lib\site-packages (0.2.1)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: There was an error checking the latest version of pip.
但是当我尝试运行模块的代码时,我遇到了这个问题:
C:\>solc-select use 0.8.7
'solc-select' is not recognized as an internal or external command,
operable program or batch file.
我也重新安装了我的 Python 3 和 pip。
Python 3.10.5
C:\>pip --version
pip 22.1 from C:\Users\Jester\AppData\Roaming\Python\Python310\site-packages\pip (python 3.10)
我在 Windows 10 x64 上遇到了这个问题,我已将 Python 和 pip 文件夹/文件添加到我的系统变量中。
用虚拟环境试试。 为此,请执行以下步骤:
python -m venv venv
初始化一个虚拟环境。 这将在您的工作文件夹中创建一个文件夹“venv”bin\venv\activate
激活您的虚拟环境,您现在应该在命令提示符中看到(venv) - C:/path/to/working/folder
。pip install sold-select
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.