当前位置: 首页 > 知识库问答 >
问题:

Python setuptools安装\u需要错误

罗法
2023-03-14

我正在使用setuptools创建一个快速设置。用于为用户安装依赖项的py脚本。该包只需要numpy和matlibplot。因此,代码如下所示:

from setuptools import setup
setup(
    name = "somePackageName",
    version = "1.0",
    packages = ['doc', 'inputs', 'inputs', 'src'],
    install_requires = ['distribute == 0.7.3', 'numpy', 'matplotlib']
    )

运行sudopython安装程序。py install为我提供了以下信息:

running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating fabSim.egg-info
writing requirements to fabSim.egg-info/requires.txt
writing fabSim.egg-info/PKG-INFO
writing top-level names to fabSim.egg-info/top_level.txt
writing dependency_links to fabSim.egg-info/dependency_links.txt
writing manifest file 'fabSim.egg-info/SOURCES.txt'
reading manifest file 'fabSim.egg-info/SOURCES.txt'
writing manifest file 'fabSim.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/doc
copying doc/__init__.py -> build/lib.linux-x86_64-2.7/doc
creating build/lib.linux-x86_64-2.7/inputs
copying inputs/__init__.py -> build/lib.linux-x86_64-2.7/inputs
creating build/lib.linux-x86_64-2.7/src
copying src/simulation.py -> build/lib.linux-x86_64-2.7/src
copying src/good.py -> build/lib.linux-x86_64-2.7/src
copying src/producer.py -> build/lib.linux-x86_64-2.7/src
copying src/__init__.py -> build/lib.linux-x86_64-2.7/src
copying src/validate.py -> build/lib.linux-x86_64-2.7/src
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/doc
copying build/lib.linux-x86_64-2.7/doc/__init__.py -> build/bdist.linux-x86_64/egg/doc
creating build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/simulation.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/good.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/producer.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/__init__.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/validate.py -> build/bdist.linux-x86_64/egg/src
creating build/bdist.linux-x86_64/egg/inputs
copying build/lib.linux-x86_64-2.7/inputs/__init__.py -> build/bdist.linux-x86_64/egg/inputs
byte-compiling build/bdist.linux-x86_64/egg/doc/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/simulation.py to simulation.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/good.py to good.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/producer.py to producer.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/validate.py to validate.pyc
byte-compiling build/bdist.linux-x86_64/egg/inputs/__init__.py to __init__.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/fabSim-1.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing fabSim-1.0-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg
Extracting fabSim-1.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
fabSim 1.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg
Processing dependencies for fabSim==1.0
Searching for matplotlib
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
Reading http://matplotlib.org
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/
Best match: matplotlib 1.3.0
Downloading https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.0/matplotlib-1.3.0.tar.gz
Processing matplotlib-1.3.0.tar.gz
Writing /tmp/easy_install-xOXtid/matplotlib-1.3.0/setup.cfg
Running matplotlib-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xOXtid/matplotlib-1.3.0/egg-dist-tmp-JFeCc4
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.

(Currently using distribute 0.6.28dev-r0 (/usr/lib/python2.7/dist-packages))
error: Setup script exited with 2

我对setuptools的理解可能是错误的,因为我希望它能够从PyPI更新/安装可用的依赖项。有人能提供更多关于这方面的见解吗?

共有1个答案

商宝
2023-03-14
pip install -U distribute

或者

easy_install -U distribute 
 类似资料:
  • 我得到以下错误: 警告:需要\u一次(C:\xampp\htdocs\mvc\public\views\home\init.php):无法打开流:C:\xampp\htdocs\mvc\public\index中没有此类文件或目录。php在线3 致命错误:require_once():无法打开所需的“C:\xampp\htdocs\mvc\public\views\home\init”。在C:\x

  • 我目前正在尝试编译和测试一个小型Android应用程序。 我正在使用Eclipse,并安装了SDK 4.2(Api级别17)。我准备好了 虽然我也尝试了不同的值(即17/17)。 我不使用任何GoogleAPI函数,也不使用API Level 8中不可用的函数。或者至少我在这方面没有收到任何编译错误或警告。 当我编译项目并在运行Android 2.2.1的真实设备上运行时,应用程序运行良好。但是,

  • 我用Java 8创建了一个Java应用程序。 我已将其部署到服务器,并出现以下错误: 当我运行java版本时,我得到了以下信息: 我以前没见过这个。我需要安装JRE 8吗?

  • 我试图安装Facebook PHP SDK与作曲家。这就是我得到的 问题是,我启用了卷曲扩展(php.ini未注释)。当我运行时,它表示已启用。我唯一的线索是,当我运行时,'curl'行丢失了,但我不知道该怎么办。 我在Win8上有wamp 2.4,我在cmd中运行composer。exe。

  • 问题内容: 我发现Scrapy是一种很好的刮刮工具,因此我尝试在机器上安装刮板,但是当我尝试将其安装一段时间后,就抛出了此错误。 我试图在虚拟环境中安装它,但问题仍然存在。 编辑:这是错误后我得到的.. 有什么帮助吗? 问题答案: 正如某人在编辑中指出的那样,如果仅下载vc_redist.x64.exe,则只有15MB,为此请转到“其他工具和框架”并选择MS Visual C ++ 通过从此处安装

  • 我正试图在运行Windows8.1和Python3.7的PC上安装新的Python模块,我发现一个解决方案是“停止微软构建工具2015”。我安装了这个软件包,但仍然面临这个错误。以下是屏幕截图(Visual C++14.0错误): 请帮我把这件事弄清楚,现在它让人头疼。