我正在尝试在命令提示符下使用pip安装Sphinx。我已经安装了许多其他插件,如virtualenv,安装工具,nose2。但是当我尝试安装Sphinx时,它出现了以下错误:
pip install Sphinx
>>> (...long install text....)
Command ""c:\program files\autodesk\maya2015\bin\mayapy.exe" -u -c "import setup
tools, tokenize;__file__='c:\\users\\gregory\\appdata\\local\\temp\\pip-build-6l
83ci\\MarkupSafe\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.r
ead().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" ins
tall --record c:\users\gregory\appdata\local\temp\pip-juw8vj-record\install-reco
rd.txt --single-version-externally-managed --compile" failed with error code 1 i
n c:\users\gregory\appdata\local\temp\pip-build-6l83ci\MarkupSafe\
我正在使用Maya 2015的mayapy.exe python解释器(python 2.7.3),而不是标准的python解释器,但我没有遇到任何麻烦。它显示了所有安装文本,但最后上面的错误是红色,并且未安装Sphinx。
在这里我有什么遗漏或做错了吗?
---编辑---
这是我从堆栈跟踪中得到的,它说升级python版本可以防止发生的事情,但python版本被锁定到应用程序。不知道该怎么做。
Command ""C:\Program Files\Autodesk\Maya2015\bin\mayapy.exe" -u -c "
import setuptools, tokenize;__file__='c:\\users\\gregory\\appdata\\local
\\temp\\pip-build-scwdtn\\MarkupSafe\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
install --record c:\users\gregory\appdata\local\temp\pip-uel6g6-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\gregory\
appdata\local\temp\pip-build-scwdtn\MarkupSafe\C:\Program Files\Autodesk\Maya2015\Python\lib\
site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning:
A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately
and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve
this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
- 编辑 -
我现在收到此信息,ssl错误不再显示。
C:\Program Files\Autodesk\Maya2015\Python\Scripts>pip install -U Sphinx
Collecting Sphinx
Using cached Sphinx-1.6.2-py2.py3-none-any.whl
Requirement already up-to-date: docutils>=0.11 in c:\program files\autodesk\maya
2015\python\lib\site-packages (from Sphinx)
Requirement already up-to-date: alabaster<0.8,>=0.7 in c:\program files\autodesk
\maya2015\python\lib\site-packages (from Sphinx)
Requirement already up-to-date: snowballstemmer>=1.1 in c:\program files\autodes
k\maya2015\python\lib\site-packages (from Sphinx)
Requirement already up-to-date: Pygments>=2.0 in c:\program files\autodesk\maya2
015\python\lib\site-packages (from Sphinx)
Requirement already up-to-date: sphinxcontrib-websupport in c:\program files\aut
odesk\maya2015\python\lib\site-packages (from Sphinx)
Requirement already up-to-date: six>=1.5 in c:\program files\autodesk\maya2015\p
ython\lib\site-packages (from Sphinx)
Requirement already up-to-date: imagesize in c:\program files\autodesk\maya2015\
python\lib\site-packages (from Sphinx)
Collecting Jinja2>=2.3 (from Sphinx)
Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Collecting colorama>=0.3.5; sys_platform == "win32" (from Sphinx)
Using cached colorama-0.3.9-py2.py3-none-any.whl
Collecting typing; python_version < "3.5" (from Sphinx)
Using cached typing-3.6.1.tar.gz
Collecting babel!=2.0,>=1.3 (from Sphinx)
Using cached Babel-2.4.0-py2.py3-none-any.whl
Requirement already up-to-date: setuptools in c:\program files\autodesk\maya2015
\python\lib\site-packages (from Sphinx)
Requirement already up-to-date: requests>=2.0.0 in c:\program files\autodesk\may
a2015\python\lib\site-packages (from Sphinx)
Collecting MarkupSafe>=0.23 (from Jinja2>=2.3->Sphinx)
Using cached MarkupSafe-1.0.tar.gz
Collecting pytz>=0a (from babel!=2.0,>=1.3->Sphinx)
Using cached pytz-2017.2-py2.py3-none-any.whl
Requirement already up-to-date: urllib3<1.22,>=1.21.1 in c:\program files\autode
sk\maya2015\python\lib\site-packages (from requests>=2.0.0->Sphinx)
Requirement already up-to-date: idna<2.6,>=2.5 in c:\program files\autodesk\maya
2015\python\lib\site-packages (from requests>=2.0.0->Sphinx)
Requirement already up-to-date: certifi>=2017.4.17 in c:\program files\autodesk\
maya2015\python\lib\site-packages (from requests>=2.0.0->Sphinx)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in c:\program files\autode
sk\maya2015\python\lib\site-packages (from requests>=2.0.0->Sphinx)
Building wheels for collected packages: typing, MarkupSafe
Running setup.py bdist_wheel for typing ... done
Stored in directory: C:\Users\Gregory\AppData\Local\pip\Cache\wheels\b3\54\d1\
d7ad0895b6f57c608afdf3ec5d2339c5d18ffcf2c2e0e0d9aa
Running setup.py bdist_wheel for MarkupSafe ... error
Complete output from command "c:\program files\autodesk\maya2015\bin\mayapy.ex
e" -u -c "import setuptools, tokenize;__file__='c:\\users\\gregory\\appdata\\loc
al\\temp\\pip-build-jwlwl9\\MarkupSafe\\setup.py';f=getattr(tokenize, 'open', op
en)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, _
_file__, 'exec'))" bdist_wheel -d c:\users\gregory\appdata\local\temp\tmpenjqanp
ip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\markupsafe
copying markupsafe\_compat.py -> build\lib.win-amd64-2.7\markupsafe
copying markupsafe\_constants.py -> build\lib.win-amd64-2.7\markupsafe
copying markupsafe\_native.py -> build\lib.win-amd64-2.7\markupsafe
copying markupsafe\__init__.py -> build\lib.win-amd64-2.7\markupsafe
running egg_info
writing MarkupSafe.egg-info\PKG-INFO
writing top-level names to MarkupSafe.egg-info\top_level.txt
writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
reading manifest file 'MarkupSafe.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MarkupSafe.egg-info\SOURCES.txt'
copying markupsafe\_speedups.c -> build\lib.win-amd64-2.7\markupsafe
running build_ext
building 'markupsafe._speedups' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setup.
py", line 132, in <module>
try_building_extension()
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setup.
py", line 111, in try_building_extension
run_setup(True)
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setup.
py", line 105, in run_setup
features=features,
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\core.py"
, line 152, in setup
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.py"
, line 953, in run_commands
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.py"
, line 972, in run_command
File "c:\program files\autodesk\maya2015\Python\lib\site-packages\wheel\bdis
t_wheel.py", line 179, in run
self.run_command('build')
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\cmd.py",
line 326, in run_command
continue
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.py"
, line 972, in run_command
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\command\
build.py", line 127, in run
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\cmd.py",
line 326, in run_command
continue
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.py"
, line 972, in run_command
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setup.
py", line 52, in run
build_ext.run(self)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\command\
build_ext.py", line 339, in run
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\command\
build_ext.py", line 448, in build_extensions
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setup.
py", line 58, in build_extension
build_ext.build_extension(self, ext)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\command\
build_ext.py", line 498, in build_extension
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9com
piler.py", line 473, in compile
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9com
piler.py", line 383, in initialize
File "c:\program files\autodesk\maya2015\Python\lib\site-packages\setuptools
\msvc.py", line 128, in msvc9_query_vcvarsall
return orig(ver, arch, *args, **kwargs)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9com
piler.py", line 266, in query_vcvarsall
File "c:\program files\autodesk\maya2015\Python\lib\site-packages\setuptools
\msvc.py", line 94, in msvc9_find_vcvarsall
return get_unpatched(msvc9_find_vcvarsall)(version)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9com
piler.py", line 243, in find_vcvarsall
TypeError: not all arguments converted during string formatting
----------------------------------------
Failed building wheel for MarkupSafe
Running setup.py clean for MarkupSafe
Successfully built typing
Failed to build MarkupSafe
Installing collected packages: MarkupSafe, Jinja2, colorama, typing, pytz, babel
, Sphinx
Running setup.py install for MarkupSafe ... error
Complete output from command "c:\program files\autodesk\maya2015\bin\mayapy.
exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\gregory\\appdata\\l
ocal\\temp\\pip-build-jwlwl9\\MarkupSafe\\setup.py';f=getattr(tokenize, 'open',
open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record c:\users\gregory\appdata\local\temp\pip-ch
rjra-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\markupsafe
copying markupsafe\_compat.py -> build\lib.win-amd64-2.7\markupsafe
copying markupsafe\_constants.py -> build\lib.win-amd64-2.7\markupsafe
copying markupsafe\_native.py -> build\lib.win-amd64-2.7\markupsafe
copying markupsafe\__init__.py -> build\lib.win-amd64-2.7\markupsafe
running egg_info
writing MarkupSafe.egg-info\PKG-INFO
writing top-level names to MarkupSafe.egg-info\top_level.txt
writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
reading manifest file 'MarkupSafe.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MarkupSafe.egg-info\SOURCES.txt'
copying markupsafe\_speedups.c -> build\lib.win-amd64-2.7\markupsafe
running build_ext
building 'markupsafe._speedups' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setu
p.py", line 132, in <module>
try_building_extension()
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setu
p.py", line 111, in try_building_extension
run_setup(True)
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setu
p.py", line 105, in run_setup
features=features,
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\core.p
y", line 152, in setup
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.p
y", line 953, in run_commands
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.p
y", line 972, in run_command
File "c:\program files\autodesk\maya2015\Python\lib\site-packages\setuptoo
ls\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\comman
d\install.py", line 563, in run
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\cmd.py
", line 326, in run_command
continue
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.p
y", line 972, in run_command
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\comman
d\build.py", line 127, in run
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\cmd.py
", line 326, in run_command
continue
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\dist.p
y", line 972, in run_command
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setu
p.py", line 52, in run
build_ext.run(self)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\comman
d\build_ext.py", line 339, in run
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\comman
d\build_ext.py", line 448, in build_extensions
File "c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\setu
p.py", line 58, in build_extension
build_ext.build_extension(self, ext)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\comman
d\build_ext.py", line 498, in build_extension
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9c
ompiler.py", line 473, in compile
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9c
ompiler.py", line 383, in initialize
File "c:\program files\autodesk\maya2015\Python\lib\site-packages\setuptoo
ls\msvc.py", line 128, in msvc9_query_vcvarsall
return orig(ver, arch, *args, **kwargs)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9c
ompiler.py", line 266, in query_vcvarsall
File "c:\program files\autodesk\maya2015\Python\lib\site-packages\setuptoo
ls\msvc.py", line 94, in msvc9_find_vcvarsall
return get_unpatched(msvc9_find_vcvarsall)(version)
File "c:\program files\autodesk\maya2015\bin\python27.zip\distutils\msvc9c
ompiler.py", line 243, in find_vcvarsall
TypeError: not all arguments converted during string formatting
----------------------------------------
Command ""c:\program files\autodesk\maya2015\bin\mayapy.exe" -u -c "import setup
tools, tokenize;__file__='c:\\users\\gregory\\appdata\\local\\temp\\pip-build-jw
lwl9\\MarkupSafe\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.r
ead().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" ins
tall --record c:\users\gregory\appdata\local\temp\pip-chrjra-record\install-reco
rd.txt --single-version-externally-managed --compile" failed with error code 1 i
n c:\users\gregory\appdata\local\temp\pip-build-jwlwl9\MarkupSafe\
C:\Program Files\Autodesk\Maya2015\Python\Scripts>