Python - manually install a package using virtualenv

I have a python program that I want to install in my virtualenv - this is a zip package that I need to unzip and then run setup.py, but my question is how to get these decompressed files into my virtualenv, so what Is the package installed in the virtual site sites folder?

I can also install my virtualenv from the inside using pip install <package name> , but for some reason the package that loads the PIP is deprecated.

So - can anyone tell me some simple steps to install the package manually?

So far I have the basic commands for downloading Virtualenv:

 -bash-3.2$ source ~/.bashrc -bash-3.2$ workon test (test)-bash-3.2$ //Now I'm working on my virtualenv, but where do I go after this?? 

So - does it matter where I unzip the python package / program - or do I need to enter the virtual file first before unpacking? After I download virtualenv and I will use it with the "workon test" command, will there be any python package that I install, no matter what directory I find it, install in the appropriate virtualenv site-packages folder ?

Option 1 is to unpack the python program in / home / username / tmp - then go into my virtual machine, go to this folder and run the setup.py program - assuming virtualenv will transfer all the relevant files to its own website in batches.

OR scenario 2 - unpack files directly into site packages and run them from there (after logging into virtualenv), etc.

Thanks for helping Python clutz with this!

+74
python installation pip virtualenv virtualenvwrapper
May 12 '11 at 14:26
source share
3 answers

Usually I would extract the program to a temporary folder and then run setup.py from that folder using the direct path to the virtual python virtualenv instance. for example, if your virtualenv is located in / home / username / virtualpy, use this (from your temporary folder)

 /home/username/virtualpy/bin/python setup.py install 

This should be installed in your virtualenv package folder.

+107
May 12 '11 at 14:42
source share

well, when you switch to a virtual environment. you must enter

which python

and if it returns the path in which your virtual environment exists, then everything is in order, you can directly run this command.

 $ python setup.py build $ python setup.py install 

but if it sets a global level path that is not your virtualenv's then you should try using

 $ ~/.virtualenv/python-env/bin/python setup.py build $ ~/.virtualenv/python-env/bin/python setup.py install 
+9
May 5 '16 at 2:36 pm
source share

If the package will not be installed from the repository, try under venv using sudo. As an example for a pathos Python package;

 /venv3.6/bin$ sudo pip3 install pathos 
0
Feb 05 '19 at 7:22
source share



All Articles