Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip installation fails #2

Open
denizdogan opened this issue Feb 10, 2015 · 9 comments
Open

pip installation fails #2

denizdogan opened this issue Feb 10, 2015 · 9 comments

Comments

@denizdogan
Copy link

I don't know if this project is even active anymore, but when I try to install it using pip on Windows, the following happens. I use Python 2.7.9 on Windows 7.

C:\Users\Deniz>pip install pywin
Downloading/unpacking pywin
  Downloading pywin-0.3.1.zip
  Running setup.py (path:c:\users\deniz\appdata\local\temp\pip_build_Deniz\pywin
\setup.py) egg_info for package pywin
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0
.6.35.tar.gz
    Extracting in c:\users\deniz\appdata\local\temp\tmpehvbw4
    Now working in c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35

    Building a Distribute egg in c:\users\deniz\appdata\local\temp\pip_build_Den
iz\pywin
    Traceback (most recent call last):
      File "setup.py", line 248, in <module>
        scripts = scripts,
      File "C:\Python27\lib\distutils\core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\setupt
ools\dist.py", line 225, in __init__
        _Distribution.__init__(self,attrs)
      File "C:\Python27\lib\distutils\dist.py", line 287, in __init__
        self.finalize_options()
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\setupt
ools\dist.py", line 257, in finalize_options
        ep.require(installer=self.fetch_build_egg)
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_re
sources.py", line 2027, in require
        working_set.resolve(self.dist.requires(self.extras),env,installer))
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_re
sources.py", line 2237, in requires
        dm = self._dep_map
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_re
sources.py", line 2466, in _dep_map
        self.__dep_map = self._compute_dependencies()
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_re
sources.py", line 2499, in _compute_dependencies
        common = frozenset(reqs_for_extra(None))
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_re
sources.py", line 2496, in reqs_for_extra
        if req.marker_fn(override={'extra':extra}):
      File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\_marke
rlib\markers.py", line 109, in marker_fn
        return eval(compiled_marker, environment)
      File "<environment marker>", line 1, in <module>
    NameError: name 'sys_platform' is not defined
    c:\users\deniz\appdata\local\temp\pip_build_Deniz\pywin\distribute-0.6.35-py
2.7.egg
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "c:\users\deniz\appdata\local\temp\pip_build_Deniz\pywin\setup.py", l
ine 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\deniz\appdata\local\temp\tmpehvbw4

Now working in c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35

Building a Distribute egg in c:\users\deniz\appdata\local\temp\pip_build_Deniz\p
ywin

Traceback (most recent call last):

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

    scripts = scripts,

  File "C:\Python27\lib\distutils\core.py", line 111, in setup

    _setup_distribution = dist = klass(attrs)

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\setuptools
\dist.py", line 225, in __init__

    _Distribution.__init__(self,attrs)

  File "C:\Python27\lib\distutils\dist.py", line 287, in __init__

    self.finalize_options()

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\setuptools
\dist.py", line 257, in finalize_options

    ep.require(installer=self.fetch_build_egg)

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_resour
ces.py", line 2027, in require

    working_set.resolve(self.dist.requires(self.extras),env,installer))

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_resour
ces.py", line 2237, in requires

    dm = self._dep_map

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_resour
ces.py", line 2466, in _dep_map

    self.__dep_map = self._compute_dependencies()

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_resour
ces.py", line 2499, in _compute_dependencies

    common = frozenset(reqs_for_extra(None))

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\pkg_resour
ces.py", line 2496, in reqs_for_extra

    if req.marker_fn(override={'extra':extra}):

  File "c:\users\deniz\appdata\local\temp\tmpehvbw4\distribute-0.6.35\_markerlib
\markers.py", line 109, in marker_fn

    return eval(compiled_marker, environment)

  File "<environment marker>", line 1, in <module>

NameError: name 'sys_platform' is not defined

c:\users\deniz\appdata\local\temp\pip_build_Deniz\pywin\distribute-0.6.35-py2.7.
egg

Traceback (most recent call last):

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

  File "c:\users\deniz\appdata\local\temp\pip_build_Deniz\pywin\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.

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\deniz\appd
ata\local\temp\pip_build_Deniz\pywin
Storing debug log for failure in C:\Users\Deniz\pip\pip.log
@malfario
Copy link

I get a similar error on Windows 8.1 + Python 3.4.3 (32 & 64 bits).
It installs fine on Python 3.4.2, though.

Traceback (most recent call last):
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\pkg_resources.py", line 2465, in _dep_map
    return self.__dep_map
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\pkg_resources.py", line 2290, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "setup.py", line 248, in <module>
    scripts = scripts,
  File "C:\Python34-x86\lib\distutils\core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\setuptools\dist.py", line 225, in __init__
    _Distribution.__init__(self,attrs)
  File "C:\Python34-x86\lib\distutils\dist.py", line 280, in __init__
    self.finalize_options()
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\setuptools\dist.py", line 257, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\pkg_resources.py", line 2028, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer)))
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\pkg_resources.py", line 2238, in requires
    dm = self._dep_map
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\pkg_resources.py", line 2467, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\pkg_resources.py", line 2500, in _compute_dependencies
    common = frozenset(reqs_for_extra(None))
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\pkg_resources.py", line 2497, in reqs_for_extra
    if req.marker_fn(override={'extra':extra}):
  File "C:\Users\rleblic\AppData\Local\Temp\tmpuu4jqv5l\distribute-0.6.35\build\src\_markerlib\markers.py", line 109, in marker_fn
    return eval(compiled_marker, environment)
  File "<environment marker>", line 1, in <module>
NameError: name 'sys_platform' is not defined
C:\Users\rleblic\AppData\Local\Temp\pip-build-xb5gyf7a\pywin\distribute-0.6.35-py3.4.egg
Traceback (most recent call last):
  File "C:\Users\rleblic\AppData\Local\Temp\pip-build-xb5gyf7a\pywin\distribute_setup.py", line 150, in use_setuptools
    raise ImportError
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "C:\Users\rleblic\AppData\Local\Temp\pip-build-xb5gyf7a\pywin\setup.py", line 4, in <module>
    use_setuptools()
  File "C:\Users\rleblic\AppData\Local\Temp\pip-build-xb5gyf7a\pywin\distribute_setup.py", line 152, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "C:\Users\rleblic\AppData\Local\Temp\pip-build-xb5gyf7a\pywin\distribute_setup.py", line 132, in _do_download
    _build_egg(egg, tarball, to_dir)
  File "C:\Users\rleblic\AppData\Local\Temp\pip-build-xb5gyf7a\pywin\distribute_setup.py", line 123, in _build_egg
    raise IOError('Could not build the egg.')
OSError: Could not build the egg.

@Luke-SF
Copy link

Luke-SF commented May 31, 2015

Yikes, I just tried with pip and easy_install and got the same error, "name 'sys_platform' is not defined". (Windows 8.1, python2.7). So is there really no longer a working win32api module for modern Python?

@autolife
Copy link

autolife commented Jun 4, 2015

I came acorss the same error in win7 ,64bit python 2.7.10,
File "distribute_setup.py", line 123, in _build_egg

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

IOError: Could not build the egg.

@digdugg
Copy link

digdugg commented Jun 29, 2015

I got this to work in Windows 7 Enterprise, python 2.7 by commenting out lines 3/4 in setup.py.

from distribute_setup import use_setuptools
use_setuptools()

After...

C:\code\pywin-master>python setup.py install
running install
running bdist_egg
running egg_info
creating pywin.egg-info
writing pywin.egg-info\PKG-INFO
writing top-level names to pywin.egg-info\top_level.txt
writing dependency_links to pywin.egg-info\dependency_links.txt
writing manifest file 'pywin.egg-info\SOURCES.txt'
reading manifest file 'pywin.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pywin.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules to install

creating build
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\EGG-INFO
installing scripts to build\bdist.win-amd64\egg\EGG-INFO\scripts
running install_scripts
running build_scripts
creating build\scripts-2.7
copying scripts\pyassoc.bat -> build\scripts-2.7
copying scripts\pywin -> build\scripts-2.7
copying scripts\pywin.bat -> build\scripts-2.7
creating build\bdist.win-amd64\egg\EGG-INFO\scripts
copying build\scripts-2.7\pyassoc.bat -> build\bdist.win-amd64\egg\EGG-INFO\scri
pts
copying build\scripts-2.7\pywin -> build\bdist.win-amd64\egg\EGG-INFO\scripts
copying build\scripts-2.7\pywin.bat -> build\bdist.win-amd64\egg\EGG-INFO\script
s
copying pywin.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying pywin.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pywin.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INF
O
copying pywin.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
copying pywin.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
creating dist
creating 'dist\pywin-0.3.1-py2.7.egg' and adding 'build\bdist.win-amd64\egg' to
it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing pywin-0.3.1-py2.7.egg
creating c:\python27\lib\site-packages\pywin-0.3.1-py2.7.egg
Extracting pywin-0.3.1-py2.7.egg to c:\python27\lib\site-packages
Adding pywin 0.3.1 to easy-install.pth file
Installing pyassoc.bat script to c:\python27\Scripts
Installing pywin script to c:\python27\Scripts
Installing pywin.bat script to c:\python27\Scripts

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

C:\code\pywin-master>pywin genlaunchers

Generating launchers...

c:\Python27\python2.7.bat -> C:\Python27\python.exe
c:\Python27\python2.6.bat -> C:\Python26\python.exe
c:\Python27\python3.4.bat -> C:\Python34\python.exe

C:\code\pywin-master>pywin -2.7
Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.

exit()

C:\code\pywin-master>pyassoc

HKEY_CURRENT_USER\Software\Classes python keys created successfully.

.py files will launch with "c:\Python27\pywin.bat"

C:\code\pywin-master>pywin -3.2
'python3.2' is not recognized as an internal or external command,
operable program or batch file.

C:\code\pywin-master>pywin -3.4
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

exit()

C:\code\pywin-master>

Seems to be working now by commenting out those 2 lines. POSSIBLE FIX.

@darvid
Copy link

darvid commented Jun 29, 2015

Can confirm @digdugg's solution works, Windows 7 with Python 3.4.3.

@caiorcferreira
Copy link

The @digdugg's solution worked for me too. Windows 10 64-bit with Python 3.5.2

@AndersonFirmino
Copy link

AndersonFirmino commented Oct 5, 2016

@digdugg works for me too tks man 🐍

@Dado5
Copy link

Dado5 commented May 6, 2017

Collecting newspaper
Using cached newspaper-0.0.9.8.tar.gz
Collecting beautifulsoup4==4.3.2 (from newspaper)
Using cached beautifulsoup4-4.3.2.tar.gz
Collecting Pillow==2.5.1 (from newspaper)
Using cached Pillow-2.5.1.zip
Collecting PyYAML==3.11 (from newspaper)
Using cached PyYAML-3.11.zip
Collecting cssselect==0.9.1 (from newspaper)
Using cached cssselect-0.9.1.tar.gz
Collecting lxml==3.3.5 (from newspaper)
Using cached lxml-3.3.5.tar.gz
Collecting nltk==2.0.5 (from newspaper)
Using cached nltk-2.0.5.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
Extracting in /tmp/tmpXRU3_3
Now working in /tmp/tmpXRU3_3/distribute-0.6.21
Building a Distribute egg in /tmp/pip-build-FTHmMn/nltk
Traceback (most recent call last):
File "setup.py", line 37, in
exec(open(init_path).read(), d)
File "", line 8, in
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/init.py", line 2, in
from setuptools.extension import Extension, Library
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/extension.py", line 2, in
from setuptools.dist import _get_unpatched
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/dist.py", line 6, in
from setuptools.command.install import install
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/command/init.py", line 8, in
from setuptools.command import install_scripts
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/command/install_scripts.py", line 3, in
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2729, in
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 700, in subscribe
callback(dist)
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2729, in
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2229, in activate
self.insert_on(path)
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2330, in insert_on
"with distribute. Found one at %s" % str(self.location))
ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /usr/lib/python2.7/dist-packages
/tmp/pip-build-FTHmMn/nltk/distribute-0.6.21-py2.7.egg
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-FTHmMn/nltk/setup.py", line 23, in
distribute_setup.use_setuptools()
File "distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "distribute_setup.py", line 116, 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 /tmp/pip-build-FTHmMn/nltk/

how to resolve?

@Dado5
Copy link

Dado5 commented May 6, 2017

i got the similar issue when i pip install newspaper

Collecting newspaper
Using cached newspaper-0.0.9.8.tar.gz
Collecting beautifulsoup4==4.3.2 (from newspaper)
Using cached beautifulsoup4-4.3.2.tar.gz
Collecting Pillow==2.5.1 (from newspaper)
Using cached Pillow-2.5.1.zip
Collecting PyYAML==3.11 (from newspaper)
Using cached PyYAML-3.11.zip
Collecting cssselect==0.9.1 (from newspaper)
Using cached cssselect-0.9.1.tar.gz
Collecting lxml==3.3.5 (from newspaper)
Using cached lxml-3.3.5.tar.gz
Collecting nltk==2.0.5 (from newspaper)
Using cached nltk-2.0.5.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
Extracting in /tmp/tmpXRU3_3
Now working in /tmp/tmpXRU3_3/distribute-0.6.21
Building a Distribute egg in /tmp/pip-build-FTHmMn/nltk
Traceback (most recent call last):
File "setup.py", line 37, in
exec(open(init_path).read(), d)
File "", line 8, in
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/init.py", line 2, in
from setuptools.extension import Extension, Library
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/extension.py", line 2, in
from setuptools.dist import _get_unpatched
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/dist.py", line 6, in
from setuptools.command.install import install
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/command/init.py", line 8, in
from setuptools.command import install_scripts
File "/tmp/tmpXRU3_3/distribute-0.6.21/setuptools/command/install_scripts.py", line 3, in
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2729, in
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 700, in subscribe
callback(dist)
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2729, in
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2229, in activate
self.insert_on(path)
File "/tmp/tmpXRU3_3/distribute-0.6.21/pkg_resources.py", line 2330, in insert_on
"with distribute. Found one at %s" % str(self.location))
ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /usr/lib/python2.7/dist-packages
/tmp/pip-build-FTHmMn/nltk/distribute-0.6.21-py2.7.egg
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-FTHmMn/nltk/setup.py", line 23, in
distribute_setup.use_setuptools()
File "distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "distribute_setup.py", line 116, 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 /tmp/pip-build-FTHmMn/nltk/

how to resolve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants