[英]Error when trying to install oct2py package
I am trying to install to oct2py package to import in my python script.我正在尝试安装到 oct2py package 以导入我的 python 脚本。 However whenever I run the command
pip install oct2py
I get the following error:但是,每当我运行命令
pip install oct2py
时,我都会收到以下错误:
Fatal error in launcher: Unable to create process using '"c:\python37\python.exe" "C:\Program Files\Python37\Scripts\pip.exe" ': file cannot be found.
How can I install oct2py?如何安装 oct2py?
Found the answer找到了答案
Deinstalled python and reinstalled it.卸载 python 并重新安装。 I checked the environment variable and changed it from this one: 'C:\Program Files\Python39' to this one 'C:\Users\lsee\AppData\Local\Programs\Python\Python39'.
我检查了环境变量并将其从这个:'C:\Program Files\Python39' 更改为这个'C:\Users\lsee\AppData\Local\Programs\Python\Python39'。
Is unable to locate your pip installer, easy fix is unusually to either upgrade or test pip:无法找到您的 pip 安装程序,简单的修复方法通常是升级或测试 pip:
# to upgrade your pip
python -m pip install --upgrade pip
pip --version
# test you have pip in your machine
If your pip version is showing that means you have it installed, it could be a problem activating your virtual environnement, or your path.如果您的 pip 版本显示这意味着您已安装它,则激活您的虚拟环境或您的路径可能有问题。
It says the file cannot be locate, are you sure your path for Python and pip is correct?它说找不到文件,您确定 Python 和 pip 的路径正确吗?
Try:尝试:
python -m pip install oct2py
This should work (as python -m pip install
gave not errors)这应该可以工作(因为
python -m pip install
没有错误)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.