'Installing python packages in google colab
I wanted to install a package in Google Colab. I tried uploading the setup.py to my drive but with no luck.
The package can be found here.
Solution 1:[1]
Just moving setup.py around doesn't help you at all, it just contains instructions on setting up the package.
For that particular package (SDPA-P), I would otherwise advise to try to !pip install the tarball you can download via https://sourceforge.net/projects/sdpa/files/sdpa-p/sdpap-0.2.1.tar.gz/download but it seems it relies on hard-coded paths:
# pip install sdpap-0.2.1.tar.gz
Processing ./sdpap-0.2.1.tar.gz
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
? exit code: 1
??> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-3nmuqm1l/setup.py", line 8, in <module>
[line.split('=') for line in open(SDPA_MAKEINC).readlines()])
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/sdpa/sdpa.7.3.1/etc/make.inc'
[end of output]
Installing that particular package will likely require quite some work; your best bet could be to build a binary wheel package out of it, and install that in Colab... but again, it'll be quite some work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AKX |
