Opened 7 years ago

Closed 4 years ago

#5507 closed defect (no-action)

[python, setuptools] module 'setuptools.dist' [...] has no 'check_specifier' attribute

Reported by: Aramir Owned by:
Priority: major Milestone:
Component: programming Keywords: setuptools make python
Cc: Parent Tickets:

Description

Hello,

Encountered this problem while installing mediaglobin 0.9.0 on a Debian Jessie Server, Python 2.7.9, Apache2. Followed the official deploying guide ( http://mediagoblin.readthedocs.io/en/stable/siteadmin/deploying.html ).
Problems occurs during the "./bootstrap.sh && ./configure && make" step, more precisely during the "make", even more precisely during the "./bin/python setup.py develop --upgrade" step of the make (last command being the only way to reproduce the bug after initial make) ...

Here's a snippet of the error :

Searching for setuptools==33.1.1
Reading https://pypi.python.org/simple/setuptools/
Best match: setuptools 33.1.1
Downloading https://pypi.python.org/packages/dc/8c/7c9869454bdc53e72fb87ace63eac39336879eef6f2bf96e946edbf03e90/setuptools-33.1.1.zip#md5=7963d41d97b94e450e3f8a217be06ffe
Processing setuptools-33.1.1.zip
Writing /tmp/easy_install-xiRu4w/setuptools-33.1.1/setup.cfg
Running setuptools-33.1.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xiRu4w/setuptools-33.1.1/egg-dist-tmp-GRU5ec
Traceback (most recent call last):
  File "setup.py", line 142, in <module>
    "Topic :: Internet :: WWW/HTTP :: Dynamic Content"
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/develop.py", line 32, in run
    self.install_for_development()
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/develop.py", line 132, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 733, in process_distribution
    self.easy_install(dist.as_requirement())
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 636, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 666, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 856, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1078, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1063, in run_setup
    run_setup(setup_script, args)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 68, in run_setup
    DirectorySandbox(setup_dir).run(runner)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 114, in run
    return func()
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 67, in runner
    _execfile(setup_script, ns)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 43, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-xiRu4w/setuptools-33.1.1/setup.py", line 181, in <module>

  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/dist.py", line 266, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/dist.py", line 301, in finalize_options
    ep.load()(self, ep.name, value)
  File "/var/www/mediagoblin/local/lib/python2.7/site-packages/pkg_resources.py", line 2195, in load
    raise ImportError("%r has no %r attribute" % (entry, attr))
ImportError: <module 'setuptools.dist' from '/var/www/mediagoblin/local/lib/python2.7/site-packages/setuptools/dist.pyc'> has no 'check_specifier' attribute
Makefile:123: recipe for target 'bin/python' failed
make: *** [bin/python] Error 1

I tried to update setuptools (installing and) using pip. But it has no real effect ... Instead of searching and matching version 33.1.1 of setuptools it goes for the version 35.0.2. But that's about it, the error remains the same.

here's the output of ./bin/pip freeze :

Babel==2.4.0
ConfigArgParse==0.11.0
ExifRead==2.1.2
Jinja2==2.9.6
Mako==1.0.6
Markdown==2.6.8
MarkupSafe==1.0
Paste==2.0.3
PasteDeploy==1.5.2
PasteScript==2.0.2
Pillow==2.6.1
PyICU==1.8
PyLD==0.7.2
Pygments==2.0.1
SOAPpy==0.12.22
SQLAlchemy==1.1.10
Sphinx==1.6.1
Tempita==0.5.3dev
Unidecode==0.04.20
WTForms==2.1
WebOb==1.7.2
WebTest==2.0.27
Werkzeug==0.12.2
acme==0.10.2
alabaster==0.7.10
alembic==0.9.2
amqp==1.4.9
anyjson==0.3.3
apipkg==1.4
appdirs==1.4.3
argparse==1.2.1
beautifulsoup4==4.6.0
billiard==3.3.0.23
celery==3.1.25
certbot==0.10.2
certbot-apache==0.10.2
chardet==2.3.0
colorama==0.3.2
configobj==5.0.6
cryptography==1.3.4
decorator==3.4.0
defusedxml==0.4.1
dnspython==1.15.0
docutils==0.12
enum34==1.0.3
execnet==1.4.1
funcsigs==1.0.2
functools32==3.2.3-2
gyp==0.1
html5lib==0.999
idna==2.0
imagesize==0.7.1
ipaddress==1.0.16
itsdangerous==0.24
jsonschema==2.6.0
kombu==3.0.37
lxml==3.4.0
-e git://git.savannah.gnu.org/mediagoblin.git@a587f8bc33069e65495405276cc8d41b588624e3#egg=mediagoblin-origin/stable
mock==1.0.1
ndg-httpsclient==0.4.2
numpy==1.8.2
oauthlib==2.0.2
packaging==16.8
parsedatetime==1.4
pbr==1.8.0
psutil==4.1.0
psycopg2==2.5.4
py==1.4.33
py-bcrypt==0.4
pyOpenSSL==16.0.0
pyRFC3339==1.0
pyasn1==0.1.9
pygobject==3.14.0
pyinotify==0.9.4
pyparsing==2.2.0
pytest==3.0.7
pytest-xdist==1.16.0
python-apt==0.9.3.12
python-augeas==0.4.1
python-dateutil==2.6.0
python-debian==0.1.27
python-debianbts==1.11
python-editor==1.0.3
pytz==2012c
reportbug==6.6.3
requests==2.11.1
roman==2.0.0
scipy==0.14.0
six==1.10.0
snowballstemmer==1.2.1
sphinxcontrib-websupport==1.0.1
sqlalchemy-migrate==0.11.0
sqlparse==0.2.3
typing==3.6.1
urllib3==1.16
virtualenv==1.11.6
waitress==1.0.2
wheel==0.24.0
wsgiref==0.1.2
wstools==0.4.3
zope.component==4.2.1
zope.event==4.0.3
zope.interface==4.1.1

Feel free to ask for more logs or informations.

PS : It may be related to https://issues.mediagoblin.org/ticket/5495 or https://github.com/pypa/setuptools/issues/967 thought it is not exactly the same error.

Attachments (1)

MakeLog (68.6 KB ) - added by Aramir 7 years ago.
full Make log

Download all attachments as: .zip

Change History (3)

by Aramir, 7 years ago

Attachment: MakeLog added

full Make log

comment:1 by Aramir, 7 years ago

Also tried to compile using "./configure –with-python3" just to see if the error was python related, but it doesn't seem to have any effect ... the Makefile created is still having "USE_PYTHON3 = false". And even setting this flag manually to true, it seems to be still trying to compile using python2.7.

comment:2 by Ben Sturmfels, 4 years ago

Resolution: no-action-required
Status: newclosed

Hi Aramir,

Thanks very much for this bug report, and I'm sorry it didn't get the appropriate attention at the time. I'll close this report now, since we now have Docker-based testing of our installation instructions in place, and haven't had any recent issues on Debian.

Regards,
Ben

Note: See TracTickets for help on using tickets.