r/pythonhelp • • May 15 '22

HOMEWORK Installing a Github Python Project WITHOUT Internet connection (via PIP? )

Hi, I am a med student and currently working on a project that requires the installation of a Github Python Project. This is the link: https://github.com/MatthewBCooke/Pathfinder

I managed to install it to my personal machine with no problems (following installation instructions and installing via "pip install jsl-pathfinder").

Now I need to install the program on a machine that is NOT connected to the internet (due to safety concerns) and im struggling to do so as the PIP command only gives "connection errors" as it cant establish a connection to PIPY.

I am an absolute noob concerning python and therefore my question is how I can install the above mentioned Github .py on my machine without using PIP comand / without Internet connection.

Thanks in advance you guys for the help!

PS: If anybody cares the study is about the effects of THC for treatment of Alzheimers disease ;)

2 Upvotes

2 comments sorted by

View all comments

2

u/kaleidist May 16 '22

You can do it, put you also have to collect all the dependencies for that package:

six 1.16.0
cycler 0.11.0
fonttools 4.29.1
python-dateutil 2.8.2
pyparsing 3.0.7
kiwisolver 1.3.2
numpy 1.22.2
Pillow 9.0.1
matplotlib 3.5.1
scipy 1.8.0
tenacity 8.0.1
xlrd 1.2.0
plotly 5.8.0

So you have to install all of those first. And then you can install the Pathfinder. Pathfinder package you can download from: https://github.com/MatthewBCooke/Pathfinder/archive/refs/heads/master.zip

You extract that, cd into its directory (e.g., cd Pathfinder-master) and then run python setup.py install.

The other packages, if they come in a similar format (directory with a setup.py), you can install in a similar way: just cd to the directory and python setup.py install.

If they come as .whl files, you cd to the directory with the .whl file and run pip install some-package.whl. Of course, replace "some-package" with the proper name!

So a bit of an involved process, but you can certainly do it!

1

u/averswalten May 19 '22

Thx for the answer!