virtualenv problem on win32

D

Danny Shevitz

Howdy,

I'm trying to use virtualenv for the first time and having endless grief.
I have upgraded my python distribution to the latest 2.7 distribution and it
is completely clean. I have prepended my path environment variable with
c:\python27 and c:\python27\scripts.
I have installed:
setuptools 0.6c11
virtualenv 1.6
windows extensions (I have read some posts that this might be important...)

When I try to create a virtual environment at the shell prompt:
virtualenv ENV

I get the following error:

###########################################################
d:\>virtualenv ENV
New python executable in ENV\Scripts\python.exe
Installing setuptools................................................
Complete output from command d:\ENV\Scripts\python.exe -c "#!python
\"\"\"Bootstra...sys.argv[1:])






" c:\python27\lib\site...ols-0.6c11-py2.7.egg:
Processing setuptools-0.6c11-py2.7.egg
creating d:\env\lib\site-packages\setuptools-0.6c11-py2.7.egg
Extracting setuptools-0.6c11-py2.7.egg to d:\env\lib\site-packages
Traceback (most recent call last):
File "<string>", line 279, in <module>
File "<string>", line 240, in main
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
1712, in main
with_ei_usage(lambda:
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
1700, in with_ei_usage
return f()
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
1716, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "c:\python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "c:\python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
211, in run
self.easy_install(spec, not self.no_deps)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
427, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
476, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
619, in install_eggs
return [self.install_egg(dist_filename, tmpdir)]
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
693, in install_egg
(os.path.basename(egg_path),os.path.dirname(destination)))
File "c:\python27\Lib\distutils\cmd.py", line 349, in execute
util.execute(func, args, msg, dry_run=self.dry_run)
File "c:\python27\Lib\distutils\util.py", line 401, in execute
func(*args)
File "c:\python27\lib\site-packages\setuptools\command\easy_install.py", line
996, in unpack_and_compile
unpack_archive(egg_path, destination, pf)
File "c:\python27\lib\site-packages\setuptools\archive_util.py", line 67, in u
npack_archive
driver(filename, extract_dir, progress_filter)
File "c:\python27\lib\site-packages\setuptools\archive_util.py", line 135, in
unpack_zipfile
z = zipfile.ZipFile(filename)
File "c:\python27\Lib\zipfile.py", line 712, in __init__
self._GetContents()
File "c:\python27\Lib\zipfile.py", line 746, in _GetContents
self._RealGetContents()
File "c:\python27\Lib\zipfile.py", line 786, in _RealGetContents
raise BadZipfile, "Bad magic number for central directory"
zipfile.BadZipfile: Bad magic number for central directory
----------------------------------------
....Installing setuptools...done.
Traceback (most recent call last):
File "c:\python27\scripts\virtualenv-script.py", line 8, in <module>
load_entry_point('virtualenv==1.6', 'console_scripts', 'virtualenv')()
File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 745, in main
prompt=options.prompt)
File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 843, in create_environment
install_setuptools(py_executable, unzip=unzip_setuptools)
File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 571, in install_setuptools
_install_req(py_executable, unzip)
File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 547, in _install_req
cwd=cwd)
File "c:\python27\lib\site-packages\virtualenv-1.6-py2.7.egg\virtualenv.py", l
ine 813, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command d:\ENV\Scripts\python.exe -c "#!python
\"\"\"Bootstra...sys.argv[1:])

" c:\python27\lib\site...ols-0.6c11-py2.7.egg failed with error code 1
###########################################################

does anyone know what is going on?

thanks,
Danny
 
D

dim

Got similar things. Don't know what is the root cause but enabling
distribute seems to work...

c:\_work\home>virtualenv --distribute pyve\openpyxl
New python executable in pyve\openpyxl\Scripts\python.exe
A globally installed setuptools was found (in c:\python25\lib\site-
packages)
Use the --no-site-packages option to use distribute in the virtualenv.
Installing
distribute............................................................................................................................................................................................done.
Installing pip.................done.

c:\_work\home>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,285
Latest member
CryptoTaxxSoftware

Latest Threads

Top