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
1 answer

How to share libraries between virtual environments and/or python installation

There is 2 situation: 1) I was trying to install pygtk in my virtual environment. py2cairo caused errors so i couldn't install. Then i linked pygtk and py2cairo in my python installation to my virtual enviroment as offered in here >> Python package…
obayhan
  • 1,636
  • 18
  • 35
4
votes
1 answer

virtualenv error on os X

When I am trying to create a new environment using virtualenv, I am running into this error. I dont think I should run the command with sudo. Have tried reinstalling python using brew & then virtualenv but nothing to…
manishpal
  • 394
  • 3
  • 6
4
votes
2 answers

Why setprojectdir command is not found in virtualenvwrapper while other command work fine

I install Python2.7.11 In CentOS 7 with this command make altinstall and use mkvirtualenv -p /usr/local/bin/python2.7 VirtualEnvName to create a new virtualenv. But when workon this virtualenv, I want to set the project dir with the command:…
GoTop
  • 850
  • 1
  • 9
  • 22
4
votes
1 answer

pip install lxml error

I am aware that this question was asked many times. I have tried all known recipes but still have a problem. So, I have created clear environment. Then pip install lxml with an error: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall…
Andriy
  • 1,270
  • 3
  • 17
  • 35
4
votes
1 answer

Update python version in existing virtualenv in ubuntu

I am trying to update the python version in my already existing virtual environment. I installed python using following steps wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz tar xfz Python-2.7.11.tgz cd Python-2.7.11/ ./configure…
Anurag
  • 1,521
  • 2
  • 17
  • 34
4
votes
4 answers

How to get matplotlib.pyplot working in virtual environment on OSX?

I first came across the answer to this question where I found out I needed to install my own backend framework. Since the answer mentioned PyQt4, I chose to go with that. Following links in the doc, I eventually ended up downloaded SIP (pre-req for…
PDN
  • 771
  • 2
  • 13
  • 29
4
votes
1 answer

How do I reset PYTHONPATH to "default" value in virtualenv?

I was struggling with installing dependencies for an external library (the requirements were already fulfilled) when I read that I should check if the install path is in my PYTHONPATH. It wasn't, so I looked up how to add it. I came across this…
Arvin
  • 71
  • 1
  • 6
4
votes
2 answers

(Buildbot) Can't activate virtualenv using ShellCommand

Returns error "OSError : no Such file or directory". We were trying to activate our newly created virtual env venvCI using the steps in builder with shellCommand.Seems like we cant activate the virtualenv venvCI. Were only new in this environment so…
4
votes
3 answers

Pip says that pymongo has been installed, but doesn't show it as installed

I'm trying to install pymongo in a virtual environment, and pip says that it's installed, but it doesn't appear to be: (venv)$ ./myapp.py Traceback (most recent call last): File "./myapp.py", line 5, in import myAppMongo File…
4
votes
0 answers

Check whether directory is a virtualenv

I'm looking for a way to test whether a directory is a virtualenv or not, e.g. by checking the existence or contents of key files inside the directory. The purpose of this is that I want to create a script which manages virtualenvs for me and I want…
Feuermurmel
  • 9,490
  • 10
  • 60
  • 90
4
votes
2 answers

"python setup.py install" does not install inside virtualenv

I am trying to install a python package using setup.py in virtualenv with Python 2.7. The requirement is package and it's dependencies should go inside site-package folder of virtualenv path. So I activated virtualenv and went to location where…
Yogesh
  • 83
  • 2
  • 7
4
votes
1 answer

virtualenv, sys.path and site-packages

i am setting up a virtualenv for django deployment. i want an isolated env without access to the global site-packages. i used the option --no-site-packages, then installed a local pip instance for that env. after using pip and a requirements.txt…
dave
  • 897
  • 1
  • 7
  • 20
4
votes
1 answer

MarkupSafe won't install in virtualenv on Amazon Linux

I find that MarkupSafe installs fine in the main machine environment, but in a virtualenv, pip silently fails. [user@host ~]$ virtualenv testenv New python executable in testenv/bin/python2.7 Also creating executable in testenv/bin/python Installing…
djsadinoff
  • 5,519
  • 6
  • 33
  • 40
4
votes
1 answer

Virtualenv can not inherit GetSitePackages() Attribute

I just installed TensorFlow under VirtualEnv on Mac OSX El Capitan. Now I am trying to understand the structure by following examples given in tensorflow.org website. I am new to python and its syntax. But as far as I can figure out the attribute…
4
votes
3 answers

Run Pinax without VirtualEnv

Is there a way to run Pinax without virtualenv? I want to run it without virtualenv as I want to run it on a django-container on mediatemples grid-hosting service. Their containers can scale upto 1Gb of dedicated memory, so I wouldnt have to worry…
Ali
  • 4,311
  • 11
  • 44
  • 49