本文介绍了Anaconda提示符将不会下载sparsesvd-命令错误,退出状态为1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Python中,我想使用 sparsesvd
包.按照安装说明,我运行了以下行:
pip install sparsesvd
最初,这似乎可行:
收集sparsesvd使用缓存的https://files.pythonhosted.org/packages/65/d9/c2545987871e27cad5969799a1d45073321a2904ac4dcb18bc0f1fe16ecc/sparsesvd-0.2.2.tar.gz已经满足的要求:c:\ users \ USER_NAME \ appdata \ local \ continuum \ anaconda3 \ lib \ site-packages中的scipy> = 0.6.0(来自sparsesvd)(1.4.1)已满足要求:c:\ users \ USER_NAME \ appdata \ local \ continuum \ anaconda3 \ lib \ site-packages中的cython(来自sparsesvd)(0.29.14)已经满足的要求:c:\ users \ USER_NAME \ appdata \ local \ continuum \ anaconda3 \ lib \ site-packages中的numpy> = 1.13.3(来自scipy> = 0.6.0-> sparsesvd)(1.19.1)用于收集包裹的建筑轮子:sparsesvd
但是随后出现错误:
sparsesvd的构建轮(setup.py)...错误错误:命令错误,退出状态为1:命令:'C:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ python.exe'-u -c'import sys,setuptools,tokenize;sys.argv [0] ='"'" C:\\ Users \\ USER_NAME \\ AppData \\ Local \\ Temp \\ pip-install-88oyknio \\ sparsesvd \\ setup.py"';__file __ =''''''C:\\ Users \\ USER_NAME \\ AppData \\ Local \\ Temp \\ pip-install-88oyknio \\ sparsesvd \\ setup.py= getattr(tokenize,'''''','open',''',',open)(__ file __); code = f.read().replace('''''''''\ r \ n''';''',',',','\\ n',',','); f.close(); exec(compile(code,__file__,'"'))'bdist_wheel -d'C:\ Users \ USER_NAME \ AppData \ Local \ Temp \ pip-wheel-57sqoa2_'--python-tag cp37cwd:C:\ Users \ USER_NAME \ AppData \ Local \ Temp \ pip-install-88oyknio \ sparsesvd \完整输出(18行):运行bdist_wheel运行构建运行build_extnumpy.distutils中没有名为"numpy.distutils._msvccompiler"的模块;从distutils尝试cythoning sparsesvd.pyx到sparsesvd.cC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ Cython \ Compiler \ Main.py:369:FutureWarning:未设置Cython指令"language_level",现在使用2(Py2).这将在以后的版本中更改!文件:C:\ Users \ USER_NAME \ AppData \ Local \ Temp \ pip-install-88oyknio \ sparsesvd \ sparsesvd.pxd树= Parsing.p_module(s,pxd,full_module_name)警告:sparsesvd.pxd:7:31:共享声明中的非平凡类型声明符(例如,指针和值的混合).每个指针声明应在其自己的行上.警告:sparsesvd.pxd:7:40:共享声明中的非平凡类型声明符(例如,指针和值的混合).每个指针声明应在其自己的行上.建立'sparsesvd'扩展创建版本创建build \ temp.win-amd64-3.7创建build \ temp.win-amd64-3.7 \ Release创建build \ temp.win-amd64-3.7 \ Release \ SVDLIBCC:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ BIN \ x86_amd64 \ cl.exe/c/nologo/Ox/W3/GL/DNDEBUG/MD -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum\ anaconda3 \ lib \ site-packages \ numpy \ core \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ include -IC:\ Program档案(x86)\ Microsoft Visual Studio 14.0 \ VC \ INCLUDE -IC:\ Program档案(x86)\ Microsoft Visual Studio 14.0 \ VC \ ATLMFC \ INCLUDE -IC:\ Program档案(x86)\ Windows Kits \ 10\ include \ 10.0.10240.0 \ ucrt/Tcsparsesvd.c/Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj稀疏文件c:\ users \ USER_NAME \ appdata \ local \ continuum \ anaconda3 \ include \ pyconfig.h(203):致命错误C1083:无法打开包含文件:'basetsd.h':没有此类文件或目录错误:命令"C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ BIN \ x86_amd64 \ cl.exe/c/nologo/Ox/W3/GL/DNDEBUG/MD -IC:\ Users \ USER_NAME \AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ numpy \ core \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \anaconda3 \ include -IC:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ INCLUDE -IC:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ ATLMFC \ INCLUDE -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.10240.0 \ ucrt/Tcsparsesvd.c/Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj失败,退出状态为2----------------------------------------错误:sparsesvd的建筑车轮失败运行sparsesvd的setup.py clean无法建立sparsesvd安装收集的软件包:sparsesvd正在运行setup.py install for sparsesvd ...错误错误:命令错误,退出状态为1:命令:'C:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ python.exe'-u -c'import sys,setuptools,tokenize;sys.argv [0] ='"'" C:\\ Users \\ USER_NAME \\ AppData \\ Local \\ Temp \\ pip-install-88oyknio \\ sparsesvd \\ setup.py"';__file __ =''''''C:\\ Users \\ USER_NAME \\ AppData \\ Local \\ Temp \\ pip-install-88oyknio \\ sparsesvd \\ setup.py= getattr(tokenize,'''''','open',''',',open)(__ file __); code = f.read().replace('''''''''\ r \ n''';''',',',','\ n',',','); f.close(); exec(compile(code,__file__,'"'))'install --record'C:\ Users \ USER_NAME \ AppData \ Local \ Temp \ pip-record-47i_nbhg \ install-record.txt'--single-version-externally-managed --compilecwd:C:\ Users \ USER_NAME \ AppData \ Local \ Temp \ pip-install-88oyknio \ sparsesvd \完整输出(14行):运行安装运行构建运行build_extnumpy.distutils中没有名为"numpy.distutils._msvccompiler"的模块;从distutils尝试跳过'sparsesvd.c'Cython扩展名(最新)建立'sparsesvd'扩展创建版本创建build \ temp.win-amd64-3.7创建build \ temp.win-amd64-3.7 \ Release创建build \ temp.win-amd64-3.7 \ Release \ SVDLIBCC:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ BIN \ x86_amd64 \ cl.exe/c/nologo/Ox/W3/GL/DNDEBUG/MD -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum\ anaconda3 \ lib \ site-packages \ numpy \ core \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ include -IC:\ Program档案(x86)\ Microsoft Visual Studio 14.0 \ VC \ INCLUDE -IC:\ Program档案(x86)\ Microsoft Visual Studio 14.0 \ VC \ ATLMFC \ INCLUDE -IC:\ Program档案(x86)\ Windows Kits \ 10\ include \ 10.0.10240.0 \ ucrt/Tcsparsesvd.c/Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj稀疏文件c:\ users \ USER_NAME \ appdata \ local \ continuum \ anaconda3 \ include \ pyconfig.h(203):致命错误C1083:无法打开包含文件:'basetsd.h':没有此类文件或目录错误:命令"C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ BIN \ x86_amd64 \ cl.exe/c/nologo/Ox/W3/GL/DNDEBUG/MD -IC:\ Users \ USER_NAME \AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ numpy \ core \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ include -IC:\ Users \ USER_NAME \ AppData \ Local \ Continuum \anaconda3 \ include -IC:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ INCLUDE -IC:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ ATLMFC \ INCLUDE -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.10240.0 \ ucrt/Tcsparsesvd.c/Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj失败,退出状态为2----------------------------------------错误:命令错误,退出状态为1:'C:\ Users \ USER_NAME \ AppData \ Local \ Continuum \ anaconda3 \ python.exe'-u -c'import sys,setuptools,tokenize;sys.argv [0] ='"'" C:\\ Users \\ USER_NAME \\ AppData \\ Local \\ Temp \\ pip-install-88oyknio \\ sparsesvd \\ setup.py"';__file __ =''''''C:\\ Users \\ USER_NAME \\ AppData \\ Local \\ Temp \\ pip-install-88oyknio \\ sparsesvd \\ setup.py= getattr(tokenize,'''''','open',''',',open)(__ file __); code = f.read().replace('''''''''\ r \ n''';''',',',','\\ n',',','); f.close(); exec(compile(code,__file__,'"'))'install --record'C:\ Users \ USER_NAME \ AppData \ Local \ Temp \ pip-record-47i_nbhg \ install-record.txt'--single-version-externally-managed --compile检查记录完整的命令输出.
我该怎么做才能安装此软件包?
解决方案
In Python, I want to use the sparsesvd
package. Following the installation instructions, I ran the following line:
pip install sparsesvd
Initially, this seems to work:
Collecting sparsesvd
Using cached https://files.pythonhosted.org/packages/65/d9/c2545987871e27cad5969799a1d45073321a2904ac4dcb18bc0f1fe16ecc/sparsesvd-0.2.2.tar.gz
Requirement already satisfied: scipy>=0.6.0 in c:\users\USER_NAME\appdata\local\continuum\anaconda3\lib\site-packages (from sparsesvd) (1.4.1)
Requirement already satisfied: cython in c:\users\USER_NAME\appdata\local\continuum\anaconda3\lib\site-packages (from sparsesvd) (0.29.14)
Requirement already satisfied: numpy>=1.13.3 in c:\users\USER_NAME\appdata\local\continuum\anaconda3\lib\site-packages (from scipy>=0.6.0->sparsesvd) (1.19.1)
Building wheels for collected packages: sparsesvd
But then an error shows:
Building wheel for sparsesvd (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\USER_NAME\AppData\Local\Temp\pip-wheel-57sqoa2_' --python-tag cp37
cwd: C:\Users\USER_NAME\AppData\Local\Temp\pip-install-88oyknio\sparsesvd\
Complete output (18 lines):
running bdist_wheel
running build
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
cythoning sparsesvd.pyx to sparsesvd.c
C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\USER_NAME\AppData\Local\Temp\pip-install-88oyknio\sparsesvd\sparsesvd.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: sparsesvd.pxd:7:31: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: sparsesvd.pxd:7:40: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
building 'sparsesvd' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\SVDLIBC
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj
sparsesvd.c
c:\users\USER_NAME\appdata\local\continuum\anaconda3\include\pyconfig.h(203): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj" failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for sparsesvd
Running setup.py clean for sparsesvd
Failed to build sparsesvd
Installing collected packages: sparsesvd
Running setup.py install for sparsesvd ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\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\USER_NAME\AppData\Local\Temp\pip-record-47i_nbhg\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\USER_NAME\AppData\Local\Temp\pip-install-88oyknio\sparsesvd\
Complete output (14 lines):
running install
running build
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
skipping 'sparsesvd.c' Cython extension (up-to-date)
building 'sparsesvd' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\SVDLIBC
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj
sparsesvd.c
c:\users\USER_NAME\appdata\local\continuum\anaconda3\include\pyconfig.h(203): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcsparsesvd.c /Fobuild\temp.win-amd64-3.7\Release\sparsesvd.obj" failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\USER_NAME\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER_NAME\\AppData\\Local\\Temp\\pip-install-88oyknio\\sparsesvd\\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\USER_NAME\AppData\Local\Temp\pip-record-47i_nbhg\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
What can I do to install this package?
解决方案
After I downloaded the Visual Studios build tools it worked for me
这篇关于Anaconda提示符将不会下载sparsesvd-命令错误,退出状态为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!