我在python3.9上安装CoolProp有困难。它在python 2.7
和使用python 3.7
的Thonny上安装得很好
当我尝试在python3.9.5和PyDroid3上运行pip安装PyDroid3时,我遇到了以下错误。
ERROR: Command Errored Out with exit status 1
我试过很多技巧,比如
Upgrading pip
pip install CoolProp --user
pip -m install CoolProp
py -3 -m pip install CoolProp --user
似乎什么都起不到作用。
在安卓系统上使用PyDroid3也给我带来了同样的问题。
在计算机上使用PIP时,我收到一条消息:
Building wheels for collected packages: CoolProp
Building wheel for CoolProp (setup.py) ... error
ERROR: Command errored out with exit status 1:
发布于 2022-10-17 06:45:16
我通过手工安装CoolProp解决了这个问题。以下是这样做的指示:
pip install Cython
,在PyDroid3中运行hamburger menu > pip > Search Libraries > Cython
,然后从那里安装它。- Run command prompt or PowerShell as an administrator.
- Type in the following commands:
cd \CoolProp-6.4.1\wrappers\Python
现在看起来应该是:
C:\\CoolProp-6.4.1\wrappers\Python>
现在输入:
python setup.py
让它跑吧。它会为你做一切。
- First change the **screen timeout duration** to the **maximum possible time** to prevent the screen from turning off. Screen turning off and locking will fail the installation (mine failed twice).
- Click on **Terminal** from within the hamburger menu inside PyDroid3.
- Type in the following commands:
cd \CoolProp-6.4.1\wrappers\Python
现在看起来应该是:
/storage/emulated/0//CoolProp-6.4.1/wrappers/Python $
现在输入:
python setup.py
看起来是这样的:
python setup.py
不让屏幕关闭,因为这会导致安装失败,您将不得不重新打开终端,导航到目录,并再次运行。
- Once The terminal finishes installation, close PyDroid3 (remove from recent apps list also) and reopen it.
- Now, go to interpreter (Hamburger menu inside PyDroid3) and type `import CoolProp`
- If the screen did not turn off during Terminal Installation, It should work and look like this:
- If it doesn't work and gives any errors, `Pydroid3 - Hamburger Menu > Pip > Install(tab) >` Enter CoolProp in the `Library Name` text field and click install. It will correct the issue. **It will say requirement already satisfied**, but it repairs the installation in the background or something. Looks like this:
- It works after that. Reopen PyDroid3 and `hamburger menu > Interpreter`
>>> import CoolProp
应该能工作。
https://stackoverflow.com/questions/74093424
复制相似问题