安装ScientificPython作为依赖项

前端之家收集整理的这篇文章主要介绍了安装ScientificPython作为依赖项前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图在我的setup.py中列出 ScientificPython作为依赖项.但是,在安装过程中,python似乎找不到包.我的做法有什么问题?

这是我的设置:

import setuptools
setuptools.setup(name = 'MyPack',version = '0.1',description= 'Description.',author = 'Me',packages = setuptools.find_packages(),install_requires = ['ScientificPython'],dependency_links = ["https://sourcesup.cru.fr/frs/?group_id=180&release_id=1351#stable-releases-2-8-title-content"])

当我运行python setup.py install时,这是输出的重要部分:

Processing dependencies for MyPack==0.1
Searching for ScientificPython
Reading https://sourcesup.cru.fr/frs/?group_id=180&release_id=1351#stable-releases-2-8-title-content
Download error: unknown url type: https -- Some packages may not be found!
Reading http://pypi.python.org/simple/ScientificPython/
Reading http://dirac.cnrs-orleans.fr/ScientificPython/
Reading http://starship.python.net/~hinsen/ScientificPython/
No local packages or download links found for ScientificPython
Best match: None
Traceback (most recent call last):
  File "setup.py",line 22,in <module>
    dependency_links = ["https://sourcesup.cru.fr/frs/?group_id=180&release_id=1351#stable-releases-2-8-title-content"])
  File "/home/woltan/local/lib/python2.7/distutils/core.py",line 152,in setup
    dist.run_commands()
  File "/home/woltan/local/lib/python2.7/distutils/dist.py",line 953,in run_commands
    self.run_command(cmd)
  File "/home/woltan/local/lib/python2.7/distutils/dist.py",line 972,in run_command
    cmd_obj.run()
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py",line 76,in run
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/install.py",line 104,in do_egg_install
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py",line 211,in run
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py",line 427,in easy_install
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py",line 478,in install_item
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py",line 519,in process_distribution
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py",line 563,in resolve
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py",line 799,in best_match
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py",line 811,in obtain
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py",line 434,in easy_install
  File "/home/woltan/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/package_index.py",line 475,in fetch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'

也许有一个问题是,ScientificPython在某种程度上不能通过PyPI访问,或者至少不能下载,因为easy_install ScentificPython将失败,没有为ScentificPython找到本地包或下载链接.

使用setuptools安装ScientificPython需要做什么?

问题特别在于它试图建立到https站点的http连接.据我所知,setuptools不支持与https的连接.您将不得不使用另一种方法获取这些包.

我的建议,如果你想使用setuptools,你在README中详细说明了他们必须下载该依赖项并安装它的文件,然后在setuptools中具有依赖性,如果它们没有它就无法安装.

原文链接:https://www.f2er.com/javaschema/281604.html

猜你在找的设计模式相关文章