virtualenv

Installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

I had problems installing psycopg2 in a virtualenv. I tried different things explained there: http://www.saltycrane.com/blog/2009/07/using-psycopg2-virtualenv-ubuntu-jaunty/ The last thing I tried is this... I created a virtualenv with -p python2.5 --no-site-packages I installed libpq-dev: apt-get install libpq-dev In the virtualenv...

How to install libxml2 in virtualenv?

I have virtualenv with --no-site-packages option. I'm using scrapy in it. Scrapy uses libxml2 by import libxml2. How to install libxml2 in virtualenv using pip or easy_install? ...

How to use virtualenv with Google App Engine SDK on Mac OS X 10.6

I am pulling my hair out trying to figure this out because I had it working until last week and somehow it broke. When I setup a virtualenv for a Google App Engine app and start the app with dev_appserver.py, I get errors importing the standard library (like "ImportError: No module named base64"). Here's what I'm doing: (Using the sy...

How do you correct Module already loaded UserWarnings in Python?

Getting the following kinds of warnings when running most python scripts in the command line: /Library/Python/2.6/site-packages/virtualenvwrapper/hook_loader.py:16: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Pyth...

Can I change an an existing virtualenv to ignore global site packages? (like --no-site-package on a new one)

Hello, I can create a new virtualenv that ignores global site-packages with "--no-site-package". Is it possible to change an existing virtualenv (which was created without "--no-site-package") to also ignore the global site-packages? (So that it workes like it was created with "--no-site-package" in the first place.) thanks in advance,...

Set python virtualenv in vim

I use vim for coding and for python coding in particular. Often I want to execute the current buffer with python interpreter. (for example to run unittests), usually I do this with :!python % <Enter> This scenatio will work works fine with global python, but I want to run virtualenv python instead. How do I enable virtualenv within vim...

Apache Can't Access Django Applications

so here's the setting: The whole site is working fine if I remove the application (whose name is myapp) in the INSTALLED_APPS section in the settings file I added WSGIPythonHome in apache2.conf I can successfully access the apps via the the interactive python shell in Django (python manage.py shell). I can create, update and delete...

Is it possible to pre-create a virtualenv for use in hudson builds?

I'm following the outline of the hudson/python/virtualenv CI solution described at heisel.org but one step of this is really chafing, and that's the part where the virtualenv, created just for the CI run, is configured: pip install -q -E ./ve -r requirements.pip pip install -q -E ./ve -r requirements-test.pip This takes an inordinate ...

Using PIP in a virtual environment, how do I install MySQL-python

When I'm in my virtual environment, I attempt to run: pip install MySQL-python This didn't work, so I tried downloading the package and installing it by running: python setup.py install This returns the following error: % python setup.py install ...

How to use ConfigParser with virtualenv?

I wrote a tool that looks in several places for an INI config file: in /usr/share, /usr/local/share, ~/.local/share, and in the current directory. c = ConfigParser.RawConfigParser() filenames = ['/usr/share/myconfig.conf', '/usr/local/share/myconfig.conf', os.path.expanduser('~/.local/share/myconfig.conf'), ...

PIP, Virtualenv & Git project setup and bootstrapping

Hey Guys, Assuming you have a project setup like this -WebApp |_ requirements.txt |_ bootstrap.py (virtualenv bootstrap script) |_ src |_ setup.py |_ develop-app |_ somecode.py |_ morecode.py The bootstap.py is created with virtualenv: http://pypi.python.org/pypi/virtualenv#creating-y...

changing the python version used in a virtualenv

Hi, i've got a project in a virtualenv, which uses python2.6, but now i'd like to make it use python2.7. Is there a way to do this without having to backup my project files, re-create the virtualenv for the right python version, and then copy my files back in the virtualenv? This does not seem to be a big task to do by hand, but being a...

Python: os.execl() - what does it do exactly? Why am I getting this error?

I'm running into some trouble with deploying Django on the passenger_wsgi module with virtualenv. The Python code in the passenger_wsgi.py file, which should fix my problem is: import os, sys INTERP = '/home/login/.virtualenvs/env_name/bin/python' if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) The first three lin...

Version controlled South migrations in virtualenv

I have a Django site placed in folder site/. It's under version control. I use South for schema and data migrations for my applications. Site-specific applications are under folder site/ so they are all version-controlled along with their migrations. I manage a virtualenv to keep third party components dry and safe. I install package...