问题
Hello I'm trying to install django-haystack
on a Debian 7 x86 but it is impossible to install, this Debian is fresh installation, I compiled python 3.6, I am little disappointed, this the error I get
100% |ââââââââââââââââââââââââââââââââ| 389kB 9.0kB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [Errno -2] Name or service not known -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-sc1wwqz8/django-haystack/setup.py", line 68, in <module>
setup_requires=['setuptools_scm'],
File "/usr/local/opt/python-3.6.1/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/root/cubapk/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/root/cubapk/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/root/cubapk/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/root/cubapk/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/root/cubapk/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/root/cubapk/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/root/cubapk/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
回答1:
@RaminNietzsche, after few days I figured out the way out to fix this trouble, what did was to install by hand this setuptools_scm
, I do not know why pip did not find any suitable distribution as the error message say.
What I did was this:
pip install setuptools_scm
回答2:
Take another look at the OSError: Name or service not known
.
This means your fresh install didn't have a proper resolver yet. Probably fixed itself a few days later, because you fixed your resolver.
来源:https://stackoverflow.com/questions/44662881/trying-to-install-django-haystack