> I am having a few problems creating a clean env, ie one with out all
> the site-package bagage.
> I'm not sure if the answer lies with my python installation, or with
> my virtualenv(wrapper) installation
>
> On running
> .............
>> mkvirtualenv env3 --no-site-packages
>> workon env3
> (env3)> python -V
> Python 2.4.3
> (env3)> python
>>>> import sys
>>>> for x in sys.path:print x
> /usr/lib/python2.4/site-packages/pip-0.8-py2.4.egg
> ..........
> I get all the /usr/lib/python2.4/site-packages
Try reversing the order of env3 and --no-site-packages on the command line. mkvirtualenv expects the environment name to be the last argument.
>
>
> Also running
> .........
> env3)>lssitepackages
> File "<string>", line 1
> import sys; print ".".join(str(p) for p in sys.version_info[:2])
> ^
> SyntaxError: invalid syntax
This is a separate problem. I don't remember when generator expressions went into the language. Apparently not in 2.4. I'll have to look at the tests and see if there's one for lssitepackages.
> ls: /home/batch/Envs/env3/lib/python/site-packages: No such file or
> directory
> ...........
> However there is a dir
> /home/batch/Envs/env3/lib/python2.4/site-packages/
>
> ( could it be that my python exe is in /usr/bin/python2.4, this is as
> I run multiple version of python )
lssitepackages isn't able to get the Python version number because of the syntax error, so it is building an invalid path.
Would you open a ticket so I don't don't forget to work on this? (http://bitbucket.org/dhellmann/virtualenvwrapper/issues?status=new&status=open)
Thanks,
Doug
What version of virtualenv are you using, and does it work as expected if you create the environment directly instead of using mkvirtualenv?
Doug
The wrapper just calls virtualenv, so if the problem is in the lower layer using mkvirtualenv will show it, too.
You may want to look at the archives on http://groups.google.com/group/python-virtualenv/ and see if anyone else had this problem.
Doug