davidmarble / virtualenvwrapper-win

Port of Doug Hellmann's virtualenvwrapper to Windows batch scripts
Other
461 stars 106 forks source link

Install from pypi fails with pip and easy_install #35

Closed rsyring closed 11 years ago

rsyring commented 11 years ago

I have a fresh python 2.7.5 installation, setuptools 0.7.2, and pip (latest). I'm unable to install using either pip or easy_install.

C:\Users\rsyring\Desktop>pip install virtualenvwrapper-win
Downloading/unpacking virtualenvwrapper-win
  Downloading virtualenvwrapper-win-1.1.4.zip
  Running setup.py egg_info for package virtualenvwrapper-win
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0
.6.35.tar.gz
    Extracting in c:\users\rsyring\appdata\local\temp\tmpq5vt15
    Now working in c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.
35
    Building a Distribute egg in c:\users\rsyring\appdata\local\temp\pip-build-r
syring\virtualenvwrapper-win
    Traceback (most recent call last):
      File "setup.py", line 45, in <module>
        exec(init_file.read(), d)
      File "<string>", line 8, in <module>
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setu
ptools\__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setu
ptools\extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setu
ptools\dist.py", line 6, in <module>
        from setuptools.command.install import install
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setu
ptools\command\__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setu
ptools\command\install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_
resources.py", line 2825, in <module>
        add_activation_listener(lambda dist: dist.activate())
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_
resources.py", line 710, in subscribe
        callback(dist)
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_
resources.py", line 2825, in <lambda>
        add_activation_listener(lambda dist: dist.activate())
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_
resources.py", line 2257, in activate
        self.insert_on(path)
      File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_
resources.py", line 2358, in insert_on
        "with distribute. Found one at %s" % str(self.location))
    ValueError: A 0.7-series setuptools cannot be installed with distribute. Fou
nd one at c:\python27\lib\site-packages\setuptools-0.7.2-py2.7.egg
    c:\users\rsyring\appdata\local\temp\pip-build-rsyring\virtualenvwrapper-win\
distribute-0.6.35-py2.7.egg
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "c:\users\rsyring\appdata\local\temp\pip-build-rsyring\virtualenvwrap
per-win\setup.py", line 4, in <module>
        use_setuptools()
      File "distribute_setup.py", line 152, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "distribute_setup.py", line 132, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "distribute_setup.py", line 123, in _build_egg
        raise IOError('Could not build the egg.')
    IOError: Could not build the egg.
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0
.6.35.tar.gz

Extracting in c:\users\rsyring\appdata\local\temp\tmpq5vt15

Now working in c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35

Building a Distribute egg in c:\users\rsyring\appdata\local\temp\pip-build-rsyri
ng\virtualenvwrapper-win

Traceback (most recent call last):

  File "setup.py", line 45, in <module>

    exec(init_file.read(), d)

  File "<string>", line 8, in <module>

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setuptoo
ls\__init__.py", line 2, in <module>

    from setuptools.extension import Extension, Library

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setuptoo
ls\extension.py", line 5, in <module>

    from setuptools.dist import _get_unpatched

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setuptoo
ls\dist.py", line 6, in <module>

    from setuptools.command.install import install

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setuptoo
ls\command\__init__.py", line 8, in <module>

    from setuptools.command import install_scripts

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\setuptoo
ls\command\install_scripts.py", line 3, in <module>

    from pkg_resources import Distribution, PathMetadata, ensure_directory

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_reso
urces.py", line 2825, in <module>

    add_activation_listener(lambda dist: dist.activate())

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_reso
urces.py", line 710, in subscribe

    callback(dist)

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_reso
urces.py", line 2825, in <lambda>

    add_activation_listener(lambda dist: dist.activate())

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_reso
urces.py", line 2257, in activate

    self.insert_on(path)

  File "c:\users\rsyring\appdata\local\temp\tmpq5vt15\distribute-0.6.35\pkg_reso
urces.py", line 2358, in insert_on

    "with distribute. Found one at %s" % str(self.location))

ValueError: A 0.7-series setuptools cannot be installed with distribute. Found o
ne at c:\python27\lib\site-packages\setuptools-0.7.2-py2.7.egg

c:\users\rsyring\appdata\local\temp\pip-build-rsyring\virtualenvwrapper-win\dist
ribute-0.6.35-py2.7.egg

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "c:\users\rsyring\appdata\local\temp\pip-build-rsyring\virtualenvwrapper-
win\setup.py", line 4, in <module>

    use_setuptools()

  File "distribute_setup.py", line 152, in use_setuptools

    return _do_download(version, download_base, to_dir, download_delay)

  File "distribute_setup.py", line 132, in _do_download

    _build_egg(egg, tarball, to_dir)

  File "distribute_setup.py", line 123, in _build_egg

    raise IOError('Could not build the egg.')

IOError: Could not build the egg.

----------------------------------------
Command python setup.py egg_info failed with error code 1 in c:\users\rsyring\ap
pdata\local\temp\pip-build-rsyring\virtualenvwrapper-win
Storing complete log in C:\Users\rsyring\pip\pip.log

C:\Users\rsyring\Desktop>easy_install virtualenvwrapper-win
Searching for virtualenvwrapper-win
Reading https://pypi.python.org/simple/virtualenvwrapper-win/
Reading https://github.com/davidmarble/virtualenvwrapper-win/
Best match: virtualenvwrapper-win 1.1.4
Downloading https://pypi.python.org/packages/source/v/virtualenvwrapper-win/virt
ualenvwrapper-win-1.1.4.zip#md5=b28bddb9262c767eec6ee17534f20fc1
Processing virtualenvwrapper-win-1.1.4.zip
Writing c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\setup.cfg
Running virtualenvwrapper-win-1.1.4\setup.py -q bdist_egg --dist-dir c:\users\rs
yring\appdata\local\temp\easy_install-a_tymt\virtualenvwrapper-win-1.1.4\egg-dis
t-tmp-dlddsg
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.3
5.tar.gz
Extracting in c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenv
wrapper-win-1.1.4\temp\tmpbf532g
Now working in c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualen
vwrapper-win-1.1.4\temp\tmpbf532g\distribute-0.6.35
Building a Distribute egg in c:\users\rsyring\appdata\local\temp\easy_install-a_
tymt\virtualenvwrapper-win-1.1.4
Traceback (most recent call last):
  File "setup.py", line 45, in <module>
    exec(init_file.read(), d)
  File "<string>", line 8, in <module>
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\setuptools\__init__.py", line 2, in
 <module>
    from setuptools.extension import Extension, Library
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\setuptools\extension.py", line 5, i
n <module>
    from setuptools.dist import _get_unpatched
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\setuptools\dist.py", line 6, in <mo
dule>
    from setuptools.command.install import install
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\setuptools\command\__init__.py", li
ne 8, in <module>
    from setuptools.command import install_scripts
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\setuptools\command\install_scripts.
py", line 3, in <module>
    from pkg_resources import Distribution, PathMetadata, ensure_directory
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\pkg_resources.py", line 2825, in <m
odule>
    add_activation_listener(lambda dist: dist.activate())
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\pkg_resources.py", line 710, in sub
scribe
    callback(dist)
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\pkg_resources.py", line 2825, in <l
ambda>
    add_activation_listener(lambda dist: dist.activate())
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\pkg_resources.py", line 2257, in ac
tivate
    self.insert_on(path)
  File "c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrappe
r-win-1.1.4\temp\tmpbf532g\distribute-0.6.35\pkg_resources.py", line 2358, in in
sert_on
    "with distribute. Found one at %s" % str(self.location))
ValueError: A 0.7-series setuptools cannot be installed with distribute. Found o
ne at c:\python27\lib\site-packages\setuptools-0.7.2-py2.7.egg
c:\users\rsyring\appdata\local\temp\easy_install-a_tymt\virtualenvwrapper-win-1.
1.4\distribute-0.6.35-py2.7.egg
error: None
davidmarble commented 11 years ago

Try again with the latest setuptools. There's been some funny issues with the past couple releases, but the latest works for me (tested today with both Python27 and Python33).

The pypi instructions now note the best way to install setuptools is by downloading this script:

https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

For example, I've downloaded it to C:\Downloads. Then with C:\Python27;C:\Python27\Scripts in my PATH:

C:\Downloads>python ez_setup.py

. . . . (a bunch of installation messages)...
Processing setuptools-0.9.8-py2.7.egg
Copying setuptools-0.9.8-py2.7.egg to c:\python27\lib\site-packages
Adding setuptools 0.9.8 to easy-install.pth file
Installing easy_install-2.7-script.py script to C:\Python27\Scripts
Installing easy_install-2.7.exe script to C:\Python27\Scripts
Installing easy_install-script.py script to C:\Python27\Scripts
Installing easy_install.exe script to C:\Python27\Scripts

Installed c:\python27\lib\site-packages\setuptools-0.9.8-py2.7.egg
Processing dependencies for setuptools==0.9.8
Finished processing dependencies for setuptools==0.9.8

C:\Downloads>easy_install virtualenvwrapper-win

. . . . (a bunch of installation messages) . . . . 
Successfully installed virtualenvwrapper-win virtualenv
Cleaning up...

Though I'd recommend pip:

C:\Downloads>python ez_setup.py
. . . . (installation messages, easy_install.exe now installed in C:\Python27\Scripts)
C:\Downloads>easy_install pip
. . . . pip.exe now installed in C:\Python27\Scripts
C:\Downloads>pip install virtualenvwrapper-win
rsyring commented 11 years ago

Thanks, I can confirm this is fixed.

Also, regarding your suggested method of installing pip just above, the pip team is warning against installing pip with easy_install due to security reasons:

http://www.pip-installer.org/en/latest/installing.html#installing-globally

Just FYI.

Thanks for your work on this project, its so much nicer working with virtualenvs on Windows!

davidmarble commented 11 years ago

Interesting. I hadn't read that before. Thanks!

On Monday, July 29, 2013, rsyring wrote:

Thanks, I can confirm this is fixed.

Also, regarding your suggested method of installing pip just above, the pip team is warning against installing pip with easy_install due to security reasons:

http://www.pip-installer.org/en/latest/installing.html#installing-globally

Just FYI.

Thanks for your work on this project, its so much nicer working with virtualenvs on Windows!

— Reply to this email directly or view it on GitHubhttps://github.com/davidmarble/virtualenvwrapper-win/issues/35#issuecomment-21725436 .