- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我对 Python 完全陌生,我想在我的学校项目中使用 matplotlib。我尝试使用 pip ( pip install matplotlib
) 安装它,但我遇到了一个非常长且看起来很糟糕的错误,我不知道该怎么办...我试图升级 pip 和 setuptools,但我没有帮助。我不明白这个问题,因为我安装了例如 numpy 没有任何问题。有谁能够帮助我?
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marci_000\\AppData\\Local\\Temp\\pip-install-6ze8b_ec\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\marci_000\\AppData\\Local\\Temp\\pip-install-6ze8b_ec\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\marci_000\AppData\Local\Temp\pip-install-6ze8b_ec\matplotlib\pip-egg-info'
cwd: C:\Users\marci_000\AppData\Local\Temp\pip-install-6ze8b_ec\matplotlib\
Complete output (228 lines):
================================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC
v.1916 64 bit (AMD64)]]
platform: yes [win32]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl/Tk]
macosx: no [Mac OS-X only]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
'svnversion' is not recognized as an internal or external command,
operable program or batch file.
non-existing path in 'numpy\\distutils': 'site.cfg'
Running from numpy source directory.
C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\setup.py:418: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\system_info.py:690: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
self.calc_info()
C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\system_info.py:690: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info()
C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\system_info.py:690: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
c:\program files\python38\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "c:\program files\python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files\python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files\python38\lib\site-packages\setuptools\command\bdist_egg.py", line 163, in run
self.run_command("egg_info")
File "c:\program files\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\command\egg_info.py", line 26, in run
File "c:\program files\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\command\build_src.py", line 142, in run
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\command\build_src.py", line 150, in build_sources
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\command\build_src.py", line 267, in build_py_modules_sources
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\misc_util.py", line 2270, in generate_config_py
File "c:\program files\python38\lib\distutils\dir_util.py", line 70, in mkpath
os.mkdir(head, mode)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 310, in wrap
path = self._remap_input(name, path, *args, **kw)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 452, in _remap_input
self._violation(operation, os.path.realpath(path), *args, **kw)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 407, in _violation
raise SandboxViolation(operation, args, kw)
setuptools.sandbox.SandboxViolation: SandboxViolation: mkdir('C:\\Users\\MARCI_~1\\AppData\\Local\\Temp\\easy_install-fqlea6jp\\numpy-1.17.3\\build', 511) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\setup.py", line 443, in <module>
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\setup.py", line 435, in setup_package
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\core.py", line 171, in setup
File "c:\program files\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\program files\python38\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: SandboxViolation: mkdir('C:\\Users\\MARCI_~1\\AppData\\Local\\Temp\\easy_install-fqlea6jp\\numpy-1.17.3\\build', 511) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files\python38\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "c:\program files\python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\program files\python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\program files\python38\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\program files\python38\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\setup.py", line 443, in <module>
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\setup.py", line 435, in setup_package
File "C:\Users\MARCI_~1\AppData\Local\Temp\easy_install-fqlea6jp\numpy-1.17.3\numpy\distutils\core.py", line 171, in setup
File "c:\program files\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\program files\python38\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: SandboxViolation: mkdir('C:\\Users\\MARCI_~1\\AppData\\Local\\Temp\\easy_install-fqlea6jp\\numpy-1.17.3\\build', 511) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\marci_000\AppData\Local\Temp\pip-install-6ze8b_ec\matplotlib\setup.py", line 262, in <module>
setup(
File "c:\program files\python38\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\program files\python38\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\program files\python38\lib\site-packages\setuptools\dist.py", line 717, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\program files\python38\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\program files\python38\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\program files\python38\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\program files\python38\lib\site-packages\setuptools\dist.py", line 787, in fetch_build_egg
return cmd.easy_install(req)
File "c:\program files\python38\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\program files\python38\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\program files\python38\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\program files\python38\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\program files\python38\lib\site-packages\setuptools\command\easy_install.py", line 1146, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: SandboxViolation: mkdir('C:\\Users\\MARCI_~1\\AppData\\Local\\Temp\\easy_install-fqlea6jp\\numpy-1.17.3\\build', 511) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
最佳答案
将您的 python 添加到路径并尝试在命令提示符下运行命令。
关于python - 我无法使用 pip 安装 matplotlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58582126/
我正在处理一组标记为 160 个组的 173k 点。我想通过合并最接近的(到 9 或 10 个组)来减少组/集群的数量。我搜索过 sklearn 或类似的库,但没有成功。 我猜它只是通过 knn 聚类
我有一个扁平数字列表,这些数字逻辑上以 3 为一组,其中每个三元组是 (number, __ignored, flag[0 or 1]),例如: [7,56,1, 8,0,0, 2,0,0, 6,1,
我正在使用 pipenv 来管理我的包。我想编写一个 python 脚本来调用另一个使用不同虚拟环境(VE)的 python 脚本。 如何运行使用 VE1 的 python 脚本 1 并调用另一个 p
假设我有一个文件 script.py 位于 path = "foo/bar/script.py"。我正在寻找一种在 Python 中通过函数 execute_script() 从我的主要 Python
这听起来像是谜语或笑话,但实际上我还没有找到这个问题的答案。 问题到底是什么? 我想运行 2 个脚本。在第一个脚本中,我调用另一个脚本,但我希望它们继续并行,而不是在两个单独的线程中。主要是我不希望第
我有一个带有 python 2.5.5 的软件。我想发送一个命令,该命令将在 python 2.7.5 中启动一个脚本,然后继续执行该脚本。 我试过用 #!python2.7.5 和http://re
我在 python 命令行(使用 python 2.7)中,并尝试运行 Python 脚本。我的操作系统是 Windows 7。我已将我的目录设置为包含我所有脚本的文件夹,使用: os.chdir("
剧透:部分解决(见最后)。 以下是使用 Python 嵌入的代码示例: #include int main(int argc, char** argv) { Py_SetPythonHome
假设我有以下列表,对应于及时的股票价格: prices = [1, 3, 7, 10, 9, 8, 5, 3, 6, 8, 12, 9, 6, 10, 13, 8, 4, 11] 我想确定以下总体上最
所以我试图在选择某个单选按钮时更改此框架的背景。 我的框架位于一个类中,并且单选按钮的功能位于该类之外。 (这样我就可以在所有其他框架上调用它们。) 问题是每当我选择单选按钮时都会出现以下错误: co
我正在尝试将字符串与 python 中的正则表达式进行比较,如下所示, #!/usr/bin/env python3 import re str1 = "Expecting property name
考虑以下原型(prototype) Boost.Python 模块,该模块从单独的 C++ 头文件中引入类“D”。 /* file: a/b.cpp */ BOOST_PYTHON_MODULE(c)
如何编写一个程序来“识别函数调用的行号?” python 检查模块提供了定位行号的选项,但是, def di(): return inspect.currentframe().f_back.f_l
我已经使用 macports 安装了 Python 2.7,并且由于我的 $PATH 变量,这就是我输入 $ python 时得到的变量。然而,virtualenv 默认使用 Python 2.6,除
我只想问如何加快 python 上的 re.search 速度。 我有一个很长的字符串行,长度为 176861(即带有一些符号的字母数字字符),我使用此函数测试了该行以进行研究: def getExe
list1= [u'%app%%General%%Council%', u'%people%', u'%people%%Regional%%Council%%Mandate%', u'%ppp%%Ge
这个问题在这里已经有了答案: Is it Pythonic to use list comprehensions for just side effects? (7 个答案) 关闭 4 个月前。 告
我想用 Python 将两个列表组合成一个列表,方法如下: a = [1,1,1,2,2,2,3,3,3,3] b= ["Sun", "is", "bright", "June","and" ,"Ju
我正在运行带有最新 Boost 发行版 (1.55.0) 的 Mac OS X 10.8.4 (Darwin 12.4.0)。我正在按照说明 here构建包含在我的发行版中的教程 Boost-Pyth
学习 Python,我正在尝试制作一个没有任何第 3 方库的网络抓取工具,这样过程对我来说并没有简化,而且我知道我在做什么。我浏览了一些在线资源,但所有这些都让我对某些事情感到困惑。 html 看起来
我是一名优秀的程序员,十分优秀!