On Windows 8, i have the following structure for a Python 3 project:
../Project/
../Project/app/app.py
../Project/app/setup.py
From the app folder, i invoke the following commands to create and enter into a virtual environment:
pyvenv.py venv
cd venv\Scripts
activate.bat
cd ../..
Now i would like to install the Nose
unit testing framework into my virtual environment:
pip install nose
... and Nose gets installed into the global folder (In my case, C:\Python33).
When i invoke python setup.py install
, my custom module gets installed to the virtual environment. Why doesn't PIP do the same?
It works well for me after following docs:
Common installation tools such as
Distribute
andpip
work as expected with venvs - i.e. when a venv is active, they install Python packages into the venv without needing to be told to do so explicitly. Of course, you need to install them into the venv first: this could be done by runningdistribute_setup.py
with the venv activated, followed by runningeasy_install pip
. Alternatively, you could download the source tarballs and runpython setup.py install
after unpacking, with the venv activated.
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