I have a shared account in a web-hosting that has Python 2.4 installed, but my code is not compatible with 2.4. Is it possible to install Python 2.6 directly to Virtualenv?
Note: I donĀ“t have permission to install it in the shared server.
Here are the options for virtualenv
$ virtualenv
You must provide a DEST_DIR
Usage: virtualenv [OPTIONS] DEST_DIR
Options:
--version show program's version number and exit.
-h, --help show this help message and exit.
-v, --verbose Increase verbosity.
-q, --quiet Decrease verbosity.
-p PYTHON_EXE, --python=PYTHON_EXE
The Python interpreter to use, e.g.,
--python=python2.5 will use the python2.5 interpreter
to create the new environment. The default is the
interpreter that virtualenv was installed with
(/usr/bin/python)
--clear Clear out the non-root install and start from scratch
--no-site-packages Don't give access to the global site-packages dir to
the virtual environment
--unzip-setuptools Unzip Setuptools or Distribute when installing it
--relocatable Make an EXISTING virtualenv environment relocatable.
This fixes up scripts and makes all .pth files
relative
--distribute Use Distribute instead of Setuptools. Set environ
variable VIRTUALENV_USE_DISTRIBUTE to make it the
default
--prompt==PROMPT Provides an alternative prompt prefix for this
environment
1) What you want to do is install python to a directory that you are able to write too.
You can follow the instructions here.
For Python 2.7.1
Python source
mkdir ~/src
mkdir ~/.localpython
cd ~/src
wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz
tar -zxvf Python-2.7.1.tgz
cd Python-2.7.1
make clean
./configure --prefix=/home/${USER}/.localpython
make
make install
2) Install virtualenv
virtualenv source
cd ~/src
wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.5.2.tar.gz#md5=fbcefbd8520bb64bc24a560c6019a73c
tar -zxvf virtualenv-1.5.2.tar.gz
cd virtualenv-1.5.2/
~/.localpython/bin/python setup.py install
3) Create a virtualenv using your local python
virtualenv docs
mkdir /home/${USER}/virtualenvs
cd /home/${USER}/virtualenvs
~/.localpython/bin/virtualenv py2.7 --python=/home/${USER}/.localpython/bin/python2.7
4) Activate the environment
cd ~/virtualenvs/py2.7/bin
source ./activate
5) Check
(py2.7)$ python
Python 2.7.1 (r271:86832, Mar 31 2011, 15:31:37)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
(py2.7)$ deactivate
$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Pre-requisites:
sudo easy_install virtualenv
sudo pip install virtualenvwrapper
Installing virtualenv with Python2.6:
You could manually download, build and install another version of Python to /usr/local or another location.
If it's another location other than /usr/local, add it to your PATH.
Reload your shell to pick up the updated PATH.
From this point on, you should be able to call the following 2 python binaries from your shell python2.5 and python2.6
Create a new instance of virtualenv with python2.6:
mkvirtualenv --python=python2.6 yournewenv
Now a days, the easiest way I found to have a more updated version of Python is to install it via conda into a conda environment.
Install conda(you may need a virtualenv for this)
pip install conda
Installing a new Python version inside a conda environent
I'm adding this answer here because no manual download is needed. conda will do that for you.
Now create an environment for the Python version you want. In this example I will use 3.5.2, because it it the latest version at this time of writing (Aug 2016).
conda create -n py35 python=3.5.2
Will create a environment for conda to install packages
To activate this environment(I'm assuming linux otherwise check the conda docs):
source activate py35
Now install what you need either via pip or conda in the environemnt(conda has better binary package support).
conda install <package_name>
Full guide with pyenv
If pyenv is not installed then install it with pyenv-installer:
$ curl https://pyenv.run | bash
To use any custom python version, e.g. 3.5.6 use the following:
pyenv install 3.5.6
pyenv virtualenv 3.5.6 NAME_OF_YOUR_ENV
cd YOUR_PROJECT_PATH
pyenv local NAME_OF_YOUR_ENV
The usual approach is to download the source and build and install locally (but not directly in virtualenv), and then create a new virtualenv using that local Python install. On some systems, it may be possible to download and install a prebuilt python, rather than building from source.
This procedure installs Python2.7 anywhere and eliminates any absolute path references within your env folder (managed by virtualenv). Even virtualenv isn't installed absolutely.
Thus, theoretically, you can drop the top level directory into a tarball, distribute, and run anything configured within the tarball on a machine that doesn't have Python (or any dependencies) installed.
Contact me with any questions. This is just part of an ongoing, larger project I am engineering. Now, for the drop...
Set up environment folders.
$ mkdir env
$ mkdir pyenv
$ mkdir dep
Get Python-2.7.3, and virtualenv without any form of root OS installation.
$ cd dep
$ wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
$ wget https://raw.github.com/pypa/virtualenv/master/virtualenv.py
Extract and install Python-2.7.3 into the pyenv dir. make clean is optional if you are doing this a 2nd, 3rd, Nth time...
$ tar -xzvf Python-2.7.3.tgz
$ cd Python-2.7.3
$ make clean
$ ./configure --prefix=/path/to/pyenv
$ make && make install
$ cd ../../
$ ls
dep env pyenv
Create your virtualenv
$ dep/virtualenv.py --python=/path/to/pyenv/bin/python --verbose env
Fix the symlink to python2.7 within env/include/
$ ls -l env/include/
$ cd !$
$ rm python2.7
$ ln -s ../../pyenv/include/python2.7 python2.7
$ cd ../../
Fix the remaining python symlinks in env. You'll have to delete the symbolically linked directories and recreate them, as above. Also, here's the syntax to force in-place symbolic link creation.
$ ls -l env/lib/python2.7/
$ cd !$
$ ln -sf ../../../pyenv/lib/python2.7/UserDict.py UserDict.py
[...repeat until all symbolic links are relative...]
$ cd ../../../
Test
$ python --version
Python 2.7.1
$ source env/bin/activate
(env)
$ python --version
Python 2.7.3
Aloha.
I'm using virtualenvwrapper and don't want to modify $PATH, here's how:
$ which python3
/usr/local/bin/python3
$ mkvirtualenv --python=/usr/local/bin/python3 env_name
You may use pyenv.
There are a lot of different versions anaconda, jython, pypy and so on...
https://github.com/yyuu/pyenv
Installation as simple as pyenv install 3.2.6
pyenv install --list
Available versions:
2.1.3
2.2.3
2.3.7
2.4
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.6.6
...
Although the question specifically describes installing 2.6, I would like to add some importants points to the excellent answers above in case someone comes across this. For the record, my case was that I was trying to install 2.7 on an ubuntu 10.04 box.
First, my motivation towards the methods described in all the answers here is that installing Python from deadsnake's ppa's has been a total failure. So building a local Python is the way to go.
Having tried so, I thought relying to the default installation of pip (with sudo apt-get install pip) would be adequate. This unfortunately is wrong. It turned out that I was getting all shorts of nasty issues and eventually not being able to create a virtualenv.
Therefore, I highly recommend to install pip locally with wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py && python get-pip.py --user. This related question gave me this hint.
Now if this doesn't work, make sure that libssl-dev for Ubuntu or openssl-dev for CentOS is installed. Install them with apt-get or yum and then re-build Python (no need to remove anything if already installed, do so on top). get-pip complains about that, you can check so by running import ssl on a py shell.
Last, don't forget to declare .local/bin and local python to path, check with which pip and which python.
No, but you can install an isolated Python build (such as ActivePython) under your $HOME directory.
This approach is the fastest, and doesn't require you to compile Python yourself.
(as a bonus, you also get to use ActiveState's binary package manager)
I have not found suitable answer, so here goes my take, which builds upon #toszter answer, but does not use system Python (and you may know, it is not always good idea to install setuptools and virtualenv at system level when dealing with many Python configurations):
#!/bin/sh
mkdir python_ve
cd python_ve
MYROOT=`pwd`
mkdir env pyenv dep
cd ${MYROOT}/dep
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-15.2.tar.gz#md5=a9028a9794fc7ae02320d32e2d7e12ee
wget https://raw.github.com/pypa/virtualenv/master/virtualenv.py
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
xz -d Python-2.7.9.tar.xz
cd ${MYROOT}/pyenv
tar xf ../dep/Python-2.7.9.tar
cd Python-2.7.9
./configure --prefix=${MYROOT}/pyenv && make -j 4 && make install
cd ${MYROOT}/pyenv
tar xzf ../dep/setuptools-15.2.tar.gz
cd ${MYROOT}
pyenv/bin/python dep/virtualenv.py --no-setuptools --python=${MYROOT}/pyenv/bin/python --verbose env
env/bin/python pyenv/setuptools-15.2/setup.py install
env/bin/easy_install pip
echo "virtualenv in ${MYROOT}/env"
The trick of breaking chicken-egg problem here is to make virtualenv without setuptools first, because it otherwise fails (pip can not be found). It may be possible to install pip / wheel directly, but somehow easy_install was the first thing which came to my mind. Also, the script can be improved by factoring out concrete versions.
NB. Using xz in the script.
First of all, Thank you DTing for awesome answer. It's pretty much perfect.
For those who are suffering from not having GCC access in shared hosting, Go for ActivePython instead of normal python like Scott Stafford mentioned. Here are the commands for that.
wget http://downloads.activestate.com/ActivePython/releases/2.7.13.2713/ActivePython-2.7.13.2713-linux-x86_64-glibc-2.3.6-401785.tar.gz
tar -zxvf ActivePython-2.7.13.2713-linux-x86_64-glibc-2.3.6-401785.tar.gz
cd ActivePython-2.7.13.2713-linux-x86_64-glibc-2.3.6-401785
./install.sh
It will ask you path to python directory. Enter
../../.localpython
Just replace above as Step 1 in DTing's answer and go ahead with Step 2 after that. Please note that ActivePython package URL may change with new release. You can always get new URL from here : http://www.activestate.com/activepython/downloads
Based on URL you need to change the name of tar and cd command based on file received.
virtualenv --python=".localpython/bin/python2.7" env
Related
I have the problem that when I run my code on a linux server I get:
ModuleNotFoundError: No module named '_sqlite3'
So after researching, I found out sqlite3 was supposed to have been installed when I installed python, however it didn't.
I think the problem comes from the way I installed python. Since I do not have sudo permissions, I installed python3.7 in a local directory using: This guide.
All solutions to this sqlite3 problem that I can find requires sudo commands.
Is there another way that I can install python3.7 together with sqlite3 in my local Linux directory without using any sudo commands?
I hope I have stated my question clearly and I would appreciate all the help I can get. Thank you!
While installing a python package in a Linux system without "sudo" privileges you can use
For Python 3
pip3 install --user pysqlite3
You can install any third party packages with the same method
pip3 install --user PACKAGE_NAME
The --user flag to pip install tells Pip to install packages in some specific directories within your home directory. For more information click here.
Hope it helps !
The solution is to first build sqlite3 into a user directory and then build python using that directory's libraries and include headers. In particular, #Ski has answered a similar question regarding python 2, which can be adopted to python 3:
$ mkdir -p ~/applications/src
$ cd ~/applications/src
$ # Download and build sqlite 3 (you might want to get a newer version)
$ wget http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz
$ tar xvvf sqlite-autoconf-3070900.tar.gz
$ cd sqlite-autoconf-3070900
$ ./configure --prefix=~/applications
$ make
$ make install
$ # Now download and build python 2, same works for python 3
$ cd ~/applications/src
$ wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
$ tar xvvf Python-2.5.2.tgz
$ cd Python-2.5.2
$ ./configure --prefix=~/applications
$ make
$ make install
$ ~/applications/bin/python
Alternatively, if you already have to specify a different --prefix for some reason (this has happened to me with pyenv), use LDFLAGS and CPPFLAGS when configuring python build:
$ ./configure LDFLAGS=-L/home/user/applications/lib/ CPPFLAGS=-I/home/user/applications/include/
I've been keeping all my python2.7 installs in my ~/.local/ directory that way I don't have to sudo every time I want to do a pip install. I also have $HOME/.local/lib/python2.7/site-packages on my $PYTHONPATH. This has worked well for years but now I find myself needing to run python3 programs more frequently. After much research it seems like virtualenv is the most recommended way to deal with python 2 and 3 on the same system. But I am running into troubles. I can spin up a python3 virtual environment but when I try to install new libs with pip, my old global path (i.e. ~/.local/) is still being searched by pip, which makes sense. However, this is even the case if I remove my ~/.local/bin/ directory from my $PATH and unset my $PYTHONPATH.
Here is are the steps I took:
First check the preliminaries before activating virtualenv. (I'm on Ubuntu 16.04 btw)
maddoxw#firefly:~$ echo $PATH
/usr/local/cuda-8.0/bin:/home/maddoxw/.node_modules_global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/maddoxw/bin:/home/maddoxw/scripts
maddoxw#firefly:~$ echo $PYTHONPATH
maddoxw#firefly:~$ python --version
Python 2.7.12
maddoxw#firefly:~$ python3 --version
Python 3.5.2
maddoxw#firefly:~$ which pip
Since I removed my ~/.local/bin directory from my path, then I can be certain pip will not be found. Also, $PYTHONPATH is still empty. Now I create my virtualenv:
maddoxw#firefly:~$ mkdir test && cd test/
mkdir: created directory 'test'
maddoxw#firefly:~/test$ python3 -m venv .env
maddoxw#firefly:~/test$ source .env/bin/activate
(.env) maddoxw#firefly:~/test$ echo $PATH
/home/maddoxw/test/.env/bin:/usr/local/cuda-8.0/bin:/home/maddoxw/.node_modules_global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/maddoxw/bin:/home/maddoxw/scripts
(.env) maddoxw#firefly:~/test$ echo $PYTHONPATH
(.env) maddoxw#firefly:~/test$ which python
/home/maddoxw/test/.env/bin/python
(.env) maddoxw#firefly:~/test$ python --version
Python 3.5.2
(.env) maddoxw#firefly:~/test$ which pip
/home/maddoxw/test/.env/bin/pip
Good. My ~/.local/ is still NOT on my $PATH, $PYTHONPATH is still empty, python points to the correct path and version, and pip is pointing to the correct location. Now lets try to pip install a fresh lib.
(.env) maddoxw#firefly:~/test$ pip install Cython
Requirement already satisfied: Cython in /home/maddoxw/.local/lib/python2.7/site-packages
Why is pip still looking in a non-$PATH path?
First, install pip3 to use with python3. You can install it with the following command and then use pip3 to install your packages.
sudo apt-get install python3-pip
[Solved]
When I initially set up my python2.7 environment way back when, I created for myself a handy little function wrapper around pip so that I wouldn't have to type out the --user every time I wanted to pip install
pip() {
if [ "$1" = "install" -o "$1" = "bundle" ]; then
cmd="$1"
shift
$HOME/.local/bin/pip $cmd --user $#
else
$HOME/.local/bin/pip $#
fi
}
I put this function in ~/.bash.d/bash_functions
and in my ~/.bashrc i added the line,
[ -f ~/.bash.d/bash_functions ] && source ~/.bash.d/bash_functions
So, although I removed $HOME/.local/ from my path. This wrapper function was still being called everytime I fired up a new terminal. Weather or not I was or was not in a virtualenv was irrelevant.
Solution?
Commented out (or delete completely) the function wrapper fixed it.
Linux is already preinstalled with Python 2.7, however I installed Python 3.5.2 thinking that I need it but actually I don't. So I want to safely and completely remove it from the system, how can I do it?
I previously installed Python 3.5.2 using the commands below
wget https://www.python.orf.ftp/python/3.5.2/Python-3.5.2.tgz
tar -xvf Python-3.5.2.tgz
cd Python-3.5.2.tgz
./configure
make install
ls /usr/local/bin //python 3.5.2 is stored at this location
There should be uninstall script but python really does not have it. If you didn't change any options from the firstplace( i mean config and make) you can do this one
//be careful with -rf//
sudo rm -rf /usr/local/bin/python3* /usr/local/bin/pydoc3 /usr/local/lib/python3.1 /usr/local/include/python3.1 /usr/local/lib/pkgconfig/python3.pc /usr/local/lib/libpython3.1.a
I followed these instructions on my RedHat Linux version 7 server (which originally just had Python 2.6.x installed):
beginning of instructions
install build tools
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y
install python 2.7 and change default python symlink
sudo yum install python27-devel -y
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
yum still needs 2.6, so write it in and backup script
sudo cp /usr/bin/yum /usr/bin/_yum_before_27
sudo sed -i s/python/python2.6/g /usr/bin/yum
sudo sed -i s/python2.6/python2.6/g /usr/bin/yum
should display now 2.7.5 or later:
python -V
end of instructions
The above commands and comments were taken from:
http://www.lecloud.net/post/61401763496/install-update-to-python-2-7-and-latest-pip-on
The python -v command returned this:
-bash: python: command not found
Now it is as if I have no Python installed. I don't want yum to break. I tried installing Python 3.4.
whereis python shows this:
python: /usr/bin/python2.6 /usr/bin/python2.6-config /usr/bin/python /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python2.7 /usr/local/bin/python3.4m-config /usr/local/bin/python2.7-config /usr/local/bin/python3.4 /usr/local/bin/python3.4m /usr/local/lib/python2.7 /usr/local/lib/python3.4 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
What should I do now? I want a working installation of Python. For certain things I'm doing, I need it to be 2.7 or higher. I want yum to still work.
Do
sudo update-alternatives --remove-all python
sudo ln -sf /usr/bin/python2.7 /usr/bin/python
I got the same issue while upgrading ubuntu 18 to 19, this made it:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
do-release-upgrade
From:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1825655
For me, nothing worked except this one:
unlink /usr/bin/python3
ln -s /usr/bin/python3.7 /usr/bin/python3
Credit: https://josephgeis.dev/2020/04/upgrading-to-ubuntu-20-04-python3/
This is easily fixed by installing the python27 package via yum. It should install in /usr/bin, and may overwrite the /usr/bin/python symlink that should be pointing to 2.6. If it did (just run ls -l python* in /usr/bin to see), remove the symlink and point it back to 2.6. Next create a symlink for /usr/local/bin/python pointing at /usr/bin/python2.7. Finally, modify your ~/.bashrc or ~/.bash_profile (whichever you use) to have /usr/local/bin before /usr/bin in your PATH:
export PATH=/usr/local/bin:$PATH
at the very end of the file. This way, /usr/bin/python remains linked to Python 2.6, which is what the system expects, and when you run python at the command line it'll start up 2.7. You shouldn't have to make any changes to the yum script either - just blanket replacing python with python2.6 without understanding what you're doing is not a very good idea.
I'd also recommend installing Python 3.4 in /usr/local/bin if possible, where the binary will be named python3 by convention. Even if it installs in /usr/bin, you'll still have the choice of running python3 or python3.4 to specify which version you want. I work on a CentOS system that has each version of Python from 2.4 up to 3.4 installed, all in /usr/local/bin (I'm sure this was done manually, and not via yum), while the only python* in /usr/bin is 2.6. I couldn't find a python3 package for RedHat (I may not have been looking hard enough), so I'd recommend building the latest version from source (3.4.3 as of this writing). Unzip the tarball in a suitable directory, check out the README file, then, in the Python-3.4.3 directory, run ./configure --help to see what the options are, and if you need to change anything. As long as you have gcc installed, and don't need to link to any weird math libraries or anything, you should just be able to run:
./configure
make
make test
sudo make install
and it'll install to /usr/local/bin. Check the messages at the end of the make step, as it'll list any modules it wasn't able to build there. Fails usually happen because you don't have a required library installed, so look in setup.py in the base directory in the detect_modules() function (starting on line 449, and stretching all the way down to line 1564). Install both the lib and the -devel packages so you get the necessary headers.
This same process can also be followed if you want to install the latest 2.7.9, instead of RH's 2.7.5. One of the major (in my eyes) advantages of 2.7.9 is that pip is installed by default, making third-party module installation that much easier.
Good luck!
I've been trying to get up and running with the built-in "venv" module of Python 3.3 on my OS X machine. I've installed Python 3.3 using Homebrew.
As per the docs, creating and switching virtual environment works as you'd expect:
$ python3 -m venv myvenv
$ source myvenv/bin/activate
And I've tested something like this:
$ echo "YEAH = 'YEAH!'" > myvenv/lib/python3.3/site-packages/thingy.py
$ python
>>> import thingy
>>> print(thingy.YEAH)
'YEAH!'
But when I try to install distribute, it simply won't go in the proper place. For some reason, it insists on trying to install into /usr/local/lib/python3.3/site-packages/, which fails with the following messages:
No setuptools distribution found
running install
Checking .pth file support in /usr/local/lib/python3.3/site-packages/
/Users/victor/myvenv/bin/python -E -c pass
TEST FAILED: /usr/local/lib/python3.3/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.3/site-packages/
and your PYTHONPATH environment variable currently contains:
''
This happens regardless if I try to install using distribute_setup.py or using the source distribution directly. I've even tried using --prefix=/Users/victor/myenv but it still tries to put everything in my "global" site-packages.
I can't figure out why this happens, but it's consistent on two of my machines. Note that sys.prefix reports the correct path (the virtual environment).
Is this a problem with Homebrew? OS X? Python 3.3? venv? Me?
This has been an issue with Homebrew, yes, but it is working now since https://github.com/mxcl/homebrew/commit/0b50110107ea2998e65011ec31ce45931b446dab.
$ brew update
$ brew rm python3 #if you have installed it before
$ brew install python3
$ cd /tmp
$ which python3
/usr/local/bin/python3
$ python3 -m venv myvenv
$ source myvenv/bin/activate
$ wget http://python-distribute.org/distribute_setup.py # may need brew install wget
$ python3 distribute_setup.py
...
Finished processing dependencies for distribute==0.6.45
After install bootstrap.
Creating /private/tmp/myvenv/lib/python3.3/site-packages/setuptools-0.6c11-py3.3.egg-info
Creating /private/tmp/myvenv/lib/python3.3/site-packages/setuptools.pth
You see that distribute install successfully into the /tmp dir.
This happens because homebrew installs distutils config file:
$ brew cat python3 | grep "Tell distutils" -A5
# Tell distutils-based installers where to put scripts
(prefix/"Frameworks/Python.framework/Versions/#{VER}/lib/python#{VER}/distutils/distutils.cfg").write <<-EOF.undent
[install]
install-scripts=#{scripts_folder}
install-lib=#{site_packages}
EOF
$ mv ~/.local/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/distutils.cfg ~/tmp/
$ cat ~/tmp/distutils.cfg
[install]
install-scripts=/Users/gatto/.local/share/python3
install-lib=/Users/gatto/.local/lib/python3.3/site-packages
$ . venv/bin/activate
(venv) $ python distribute-0.6.36/distribute_setup.py
(venv) $ ls venv/lib/python3.3/site-packages/
distribute-0.6.36-py3.3.egg easy-install.pth setuptools-0.6c11-py3.3.egg-info setuptools.pth
See "distutils.cfg Can Break venv" issue at bugs.python.org.