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

Can't install glastopf on Ubuntu 14.04: NameError: name 'sys_platform' is not defined #200

Closed
exabrial opened this issue Oct 13, 2014 · 8 comments

Comments

@exabrial
Copy link

Doesn't working either from pip or source:

jonathan.fisher@glastopf:/opt/glastopf$ sudo python setup.py install
Extracting in /tmp/tmpQQz1IW
Now working in /tmp/tmpQQz1IW/distribute-0.6.35
Building a Distribute egg in /opt/glastopf
Traceback (most recent call last):
  File "setup.py", line 248, in <module>
    scripts = scripts,
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/tmp/tmpQQz1IW/distribute-0.6.35/setuptools/dist.py", line 225, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/tmp/tmpQQz1IW/distribute-0.6.35/setuptools/dist.py", line 257, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "/tmp/tmpQQz1IW/distribute-0.6.35/pkg_resources.py", line 2027, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/tmp/tmpQQz1IW/distribute-0.6.35/pkg_resources.py", line 2237, in requires
    dm = self._dep_map
  File "/tmp/tmpQQz1IW/distribute-0.6.35/pkg_resources.py", line 2466, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/tmp/tmpQQz1IW/distribute-0.6.35/pkg_resources.py", line 2499, in _compute_dependencies
    common = frozenset(reqs_for_extra(None))
  File "/tmp/tmpQQz1IW/distribute-0.6.35/pkg_resources.py", line 2496, in reqs_for_extra
    if req.marker_fn(override={'extra':extra}):
  File "/tmp/tmpQQz1IW/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
/opt/glastopf/distribute-0.6.35-py2.7.egg
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    use_setuptools()
  File "/opt/glastopf/distribute_setup.py", line 152, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "/opt/glastopf/distribute_setup.py", line 132, in _do_download
    _build_egg(egg, tarball, to_dir)
  File "/opt/glastopf/distribute_setup.py", line 123, in _build_egg
    raise IOError('Could not build the egg.')
IOError: Could not build the egg.
@glaslos
Copy link
Member

glaslos commented Oct 13, 2014

Try pip install --upgrade setuptools

@exabrial
Copy link
Author

jonathan.fisher@glastopf:~$ sudo pip install --upgrade setuptools
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages
Cleaning up...

@katkad
Copy link
Member

katkad commented Oct 14, 2014

hello,

I use Ubuntu 14.04, and could not reproduce
which version of python do you use ?

@katkad
Copy link
Member

katkad commented Oct 14, 2014

maybe install distribute manually:
wget https://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
tar -xzvf distribute-0.6.35.tar.gz
cd distribute-0.6.35
python setup.py install

@katkad
Copy link
Member

katkad commented Oct 14, 2014

I was able to reproduce, after reinstalling pip
https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1306991

I had to do:

rm -rf /usr/local/lib/python2.7/dist-packages/distribute-0.7.3-py2.7.egg-info/
rm -rf /usr/local/lib/python2.7/dist-packages/setuptools*

and install distribute 0.6.35 like in previous comment to make glastopf installation work

@exabrial
Copy link
Author

Did the exact same thing. I uninstalled python-pip, installed pip manually, removed distribute and setuptools, manually installed distribute, then the pip install glastopf was successful.

@ghost
Copy link

ghost commented May 24, 2015

@exabrial
I am getting the same error as you -> tryed to use your solution, yet didn't successed.
i am using debian 8 "Jessie" Python 2.7.9, GCC 4.9.2 -- > any suggestions ?

@exabrial
Copy link
Author

Ah shoot this was so long ago I can't remember. I'll look tomorrow and see if the bash history still exists and paste it here.

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

3 participants