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
:
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.
Most Python packages are now designed to be compatible with Python's pip package manager. But if you have a package that is not compatible with pip, you'll need manually install Python packages.
If you are not able to install modules on a machine(due to not having enough permissions), you could use either virtualenv or save the module files in another directory and use the following code to allow Python to search for modules in the given module: >>> import os, sys >>> file_path = 'AdditionalModules/' >>> sys.
npm, Homebrew, Yarn, RequireJS, and Bower are the most popular alternatives and competitors to pip.
You may use pip
for that without using the network. See in the docs (search for "Install a particular source archive file"). Any of those should work:
pip install relative_path_to_seaborn.tar.gz pip install absolute_path_to_seaborn.tar.gz pip install file:///absolute_path_to_seaborn.tar.gz
Or you may uncompress the archive and use setup.py
directly with either pip
or python
:
cd directory_containing_tar.gz tar -xvzf seaborn-0.10.1.tar.gz pip install seaborn-0.10.1 python setup.py install
Of course, you should also download required packages and install them the same way before you proceed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With