Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python:pip-can';找不到setup.py_Python_Pip_Setuptools - Fatal编程技术网

Python:pip-can';找不到setup.py

Python:pip-can';找不到setup.py,python,pip,setuptools,Python,Pip,Setuptools,如何指导pip查找setup.py?我的setup.py文件位于~/setuptools-3.5.1 我跑 dustin@dustin:~$ python setuptools-3.5.1/setup.py egg_info running egg_info writing requirements to setuptools.egg-info/requires.txt writing setuptools.egg-info/PKG-INFO writing top-level names to

如何指导pip查找
setup.py
?我的
setup.py
文件位于
~/setuptools-3.5.1

我跑

dustin@dustin:~$ python setuptools-3.5.1/setup.py egg_info
running egg_info
writing requirements to setuptools.egg-info/requires.txt
writing setuptools.egg-info/PKG-INFO
writing top-level names to setuptools.egg-info/top_level.txt
writing dependency_links to setuptools.egg-info/dependency_links.txt
writing entry points to setuptools.egg-info/entry_points.txt
reading manifest file 'setuptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'setuptools.egg-info/SOURCES.txt'
dustin@dustin:~$ 
看起来一切都很好,但当我运行pip时,我

Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib
Storing debug log for failure in /home/dustin/.pip/pip.log

我的印象是,当我运行pip时,它没有找到
setup.py

导航到包含setup.py的目录并运行:

pip install -e .

导航到包含setup.py的目录并运行:

pip install -e .

matplotlib
具有许多外部依赖项。其中一些是必需的。您可以在尝试的
pip安装所生成的日志文件中看到所需的列表。在您的情况下,是这样的:

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.8.1]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
               tornado: yes [using tornado version 3.2.1]
             pyparsing: yes [pyparsing was not found. It is required for
                        mathtext support. pip/easy_install may attempt to
                        install it after matplotlib.]
                 pycxx: yes [Couldn't import.  Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [pkg-config information for 'freetype2' could
                        not be found.]
                   png: yes [pkg-config information for 'libpng' could not
                        be found. Using unknown version.]


在这里,您可以看到找不到
freetype
。您需要在系统上安装它。

matplotlib
有许多外部依赖项。其中一些是必需的。您可以在尝试的
pip安装所生成的日志文件中看到所需的列表。在您的情况下,是这样的:

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.8.1]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
               tornado: yes [using tornado version 3.2.1]
             pyparsing: yes [pyparsing was not found. It is required for
                        mathtext support. pip/easy_install may attempt to
                        install it after matplotlib.]
                 pycxx: yes [Couldn't import.  Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [pkg-config information for 'freetype2' could
                        not be found.]
                   png: yes [pkg-config information for 'libpng' could not
                        be found. Using unknown version.]


在这里,您可以看到找不到
freetype
。您需要在系统上安装它。

也有同样的问题。这可能是因为某些依赖项可能未安装。通过在ubuntu中使用PackageManager安装解决了这个问题。使用以下命令

sudo apt-get install python-matplotlib

希望这有帮助。

也有同样的问题。这可能是因为某些依赖项可能未安装。通过在ubuntu中使用PackageManager安装解决了这个问题。使用以下命令

sudo apt-get install python-matplotlib

希望这有帮助。

导航到包含setup.py的目录并运行:

pip install -e .
pip安装-e

这对我有用。但是当我在anaconda环境终端中使用“pip install-e.[all]”时,仍然没有找到按摩setup.py。
相反,我使用了“pip install gym[全部]”,它成功了

导航到包含setup.py的目录并运行:

pip install -e .
pip安装-e

这对我有用。但是当我在anaconda环境终端中使用“pip install-e.[all]”时,仍然没有找到按摩setup.py。

相反,我使用了“pip install gym[全部]”,它成功了

“我想要什么”部分很重要。它应该是一个顶层带有setup.py的包。不是,但是
matplotlib
必须是一个pip可安装包。是吗?我知道,我以前也有过类似的问题。但我不确定它是否可以安装pip。在过去,我必须通过各种循环才能使用许多版本的matplotlib。
/home/dustin/.pip/pip.log
说明了什么?看起来您的系统上缺少了
freetype
freetype2
。“我想要什么”部分很重要。它应该是一个顶层带有setup.py的包。不是,但是
matplotlib
必须是一个pip可安装包。是吗?我知道,我以前也有过类似的问题。但我不确定它是否可以安装pip。在过去,为了使用matplotlib的许多版本,我不得不经历各种循环。
/home/dustin/.pip/pip.log
会说什么?看起来你的系统上缺少了
freetype
freetype2
。你不需要
-e
。导航到
setup.py
所在的目录,然后尝试安装不起作用。它会产生相同的错误。
ls-lah
-您的权限是否适合您安装为的用户?
-rw rw-1达斯汀达斯汀8.2K Apr 7 19:07 setup.py drwxr-x 4达斯汀达斯汀4.0K May 7 16:26 setuptools drwxrwxr-x 2达斯汀达斯汀4.0K May 7 16:20 setuptools.egg-info drwxrwxrxr-x 3达斯汀达斯汀4.0K May 7 16:20测试
这是在virtualenv中,还是您正在安装软件包?您不需要
-e
。导航到
setup.py
所在的目录,然后尝试安装不起作用。它会产生相同的错误。
ls-lah
-您的权限是否适合您安装为的用户?
-rw rw-1达斯汀达斯汀8.2K Apr 7 19:07 setup.py drwxr-x 4达斯汀达斯汀4.0K May 7 16:26 setuptools drwxrwxr-x 2达斯汀达斯汀4.0K May 7 16:20 setuptools.egg-info drwxrwxrxr-x 3达斯汀达斯汀4.0K May 7 16:20测试
这是在virtualenv中还是您正在安装软件包?