Questions tagged [virtualenv]

virtualenv is a tool that creates sandboxed Python environments.

virtualenv allows you to create a sandboxed and isolated environment where Python packages can be installed without interfering with other packages on the same machine. With several virtualenvs, many different pieces of Python software with different and even mutually exclusive dependencies can live together.

The source code of this tool is hosted on GitHub.

Basic usage:

$ virtualenv ENV
$ source ENV/bin/activate
(ENV) $ easy_install (package)
(ENV) $ deactivate
$ ...

See the Command reference for a complete list of all available commands.

7398 questions
4
votes
4 answers

Messy Python install? (OS X)

I am a complete beginner to both Python and the OS X Terminal, and I have attempted to install some packages for both Python 2.7.3 and Python 3.4. I can't get mechanize to work with neither Python 2 or Python 3 after install. I get: >>> from…
P A N
  • 5,642
  • 15
  • 52
  • 103
4
votes
1 answer

Mix Python virtualenv packages with distro packages?

What is a good way to handle the case when you use Python virtualenv but you want some of the packages installed via your distro's package manager? Let's say you need lxml but because you can't get pip install lxml to work on Ubuntu. and you really…
NeuronQ
  • 7,527
  • 9
  • 42
  • 60
4
votes
1 answer

Error when setting up virtualenv with Python 3

I'm attempting to create a virtualenv (using virtualenvwrapper) with Python 3 as my default interpreter, but keep receiving the same error after un/reinstalling Python 3, virtualenv, and virtualenvwrapper several times. $ mkvirtualenv -p…
4
votes
2 answers

virtualenv on Windows: not over-riding installed package

My current setup is Python 2.5/ Django 1.1.1 on Windows. I want to start using Django 1.2 on some projects, but can't use it for everything. Which is just the sort of thing I've got virtualenv for. However, I'm running into a problem I've never…
Tom
  • 22,301
  • 5
  • 63
  • 96
4
votes
1 answer

Error using virtualenvwrapper-win passing in different python version

I have python 3.4 and 2.7 installed, the paths to those are C:\python34 and C:\python27. In attempting to make a virtualenv using python 2.7 I get the following errors: C:\Development>mkvirtualenv --python=C:\python27 env Running virtualenv…
Rob
  • 109
  • 2
  • 8
4
votes
0 answers

pip install -r requirements.txt fails on scipy, but works when run manually line-by-line

I'm trying to run pip install -r requirements.txt inside a virtualenv using the following requirements.txt: CherryPy==3.6.0 jellyfish==0.4.0 numpy==1.9.2 pygit2==0.20.3 scipy==0.15.1 But it fails on scipy with the following error message: Command…
Daniel
  • 2,728
  • 3
  • 21
  • 33
4
votes
1 answer

Could not import runpy module in python virtual environment

while trying to run memory profiler (https://pypi.python.org/pypi/memory_profiler) in virtual environment using bash /activate, I couldnt run any of the default test code python -m memory_profiler test/test_as.py Could not import runpy module while…
ravi.zombie
  • 1,482
  • 1
  • 20
  • 23
4
votes
2 answers

Directory change not occuring with setvirtualenvproject

I'm embracing VirtualEnvWrapper - and like what I see a lot. However as I try to get going I'm not seeing the behaviour I expect when trying to set up project directory association with virtual envs. I've installed virtualenv and -wrapper. I can…
RossGK
  • 515
  • 2
  • 7
  • 19
4
votes
1 answer

why can't my virtualenv find distutils.sysconfig?

I've just forked a Python project that was built with test driven development. I certainly see its value and I'm looking forward to making further use out of it. I've installed all the required Python interpreters (see tox.ini) using pyenv. Running…
wxl
  • 246
  • 3
  • 10
4
votes
1 answer

How do you recompile python in virtual env with --enable-shared

Once I made my virtualenv, Python was already installed. How do I add the option --enable-shared? Do I delete it or start virtualenv over from fresh? If I do that, how do I add the Python option? I don't want to mess anything up.
User
  • 23,729
  • 38
  • 124
  • 207
4
votes
1 answer

ImportError while installing pip in virtualenv

I have a rhel machine with python2.6 installed on it. I've been trying to have an alternate install of python2.7 and set up a virtualenv for using 2.7. I installed python2.7 by building from source as follows: ./configure --prefix=/usr/local…
saurabh
  • 83
  • 1
  • 7
4
votes
1 answer

virtualenvwrapper.sh: fork: Resource temporarily unavailable - Python/Django

What do I have to do to successfully launch virtualenvwrapper.sh? What do I need to put into my .bashrc? The error message: /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh: fork: Resource temporarily unavailable #When I…
Marcel
  • 41
  • 1
4
votes
4 answers

Default libraries in freshly created Python virtual environment

I created a new virtual environment using the python virtualenv tool. virtualenv venv I then activated the virtual environment source venv/bin/activate Then I did a pip freeze and this is what I got: (venv)$ pip…
Pranjal Mittal
  • 10,772
  • 18
  • 74
  • 99
4
votes
3 answers

How to edit .bashrc to use workon command of virtualenvwrapper

Each time I open terminal I have to run this command source $(which virtualenvwrapper.sh) To use workon myenv I would like to know what I need to add to .bashrc so I could use workon command instantly, without using source before I'm using Ubuntu…
micgeronimo
  • 2,069
  • 5
  • 23
  • 44
4
votes
2 answers

Activate a python virtual environment using activate_this.py in a fabfile on Windows

I have a Fabric task that needs to access the settings of my Django project. On Windows, I'm unable to install Fabric into the project's virtualenv (issues with Paramiko + pycrypto deps). However, I am able to install Fabric in my system-wide…
Rudy Lattae
  • 851
  • 1
  • 11
  • 13
1 2 3
99
100