0

I am having trouble installing CoolProp on python 3.9. It installed perfectly on python 2.7 and Thonny which uses python 3.7

When I try to run pip install CoolProp on python 3.9.5 on windows and also on PyDroid3 for android, I come across the following error.

ERROR: Command Errored Out with exit status 1

I have tried many tricks like doing

Upgrading pip
pip install CoolProp --user
pip -m install CoolProp
py -3 -m pip install CoolProp --user

Nothing seems to work.

Using PyDroid3 on Android also gives me the same problem. Error Message

While using PIP on the computer, I get a message that reads

Building wheels for collected packages: CoolProp
  Building wheel for CoolProp (setup.py) ... error
  ERROR: Command errored out with exit status 1:

1 Answers1

0

I solved the problem by doing a manual installation of CoolProp. Following are the instructions to do so:

  • First run pip install Cython on windows and in PyDroid3, hamburger menu > pip > Search Libraries > Cython and install it from there.

  • Download CoolProp Sources from either GitHub or SourceForge.

  • On both Android and PC, extract the zip files to a separate folder(any folder you wish, I personally create a folder (far away from regularly used folders) called CK_CoolProp_Sources and extract to it and forget about that folder. I did not delete it lest it corrupt something).

  • For PC:

    • Run command prompt or PowerShell as an administrator.
    • Type in the following commands:
    cd <The directory where you extracted the zip file to>\CoolProp-6.4.1\wrappers\Python
    

    Now It should look like:

    C:\<The path to extracted>\CoolProp-6.4.1\wrappers\Python>
    

    Now type:

    python setup.py
    

    Let it run. It will do everything for you.

  • For Pydroid3:

    • 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 <The directory where you extracted the zip file to>\CoolProp-6.4.1\wrappers\Python
    

    Now It should look like:

    /storage/emulated/0/<The path to extracted>/CoolProp-6.4.1/wrappers/Python $
    

    Now type:

    python setup.py
    

    Looks like this: PyDroid_Shell Do NOT let the screen turn off coz that will fail the installation and you will have to reopen terminal, navigate to directory and run python setup.py again

    • 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: Success

    • 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: Rebuild

    • It works after that. Reopen PyDroid3 and hamburger menu > Interpreter

    >>> import CoolProp should work.