Fix Python – How to install Python packages from the tar.gz file without using pip install

Question

Asked By – yenoolnairb

Long story short my work computer has network constraints which means trying to use pip install in cmd just leads to timing out/not finding package errors.

For example; when I try to pip install seaborn:
enter image description here

Instead I have tried to download the tar.gz file of the packages I want, however, I do not know how to install them. I’ve extracted the files from the tar.gz file and there is a “setup” file within but it’s not doing much for me.

If someone could explain how to install python packages in this manner without using pip install on windows that would be amazing.

Now we will see solution for issue: How to install Python packages from the tar.gz file without using pip install


Answer

Thanks to the answers below combined I’ve got it working.

  • First needed to unpack the tar.gz file into a folder.
  • Then before running python setup.py install had to point cmd towards the correct folder. I did this by pushd C:\Users\absolutefilepathtotarunpackedfolder
  • Then run python setup.py install

Thanks Tales Padua & Hugo Honorem

This question is answered By – yenoolnairb

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0