[英]Trying to install django-haystack
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 您好我正在尝试在Debian 7 x86上安装
django-haystack
但是无法安装,这个Debian是全新安装,我编译了python 3.6,我很失望,这是我得到的错误
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')
@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. @RaminNietzsche,几天后我想出了解决这个问题的方法,手动安装这个
setuptools_scm
是什么,我不知道为什么pip找不到任何合适的发行版,因为错误信息说。
What I did was this: 我做的是这样的:
pip install setuptools_scm
Take another look at the OSError: Name or service not known
. 再看一下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.
几天后可能会修复自己,因为你修复了你的解析器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.