

关于安装 pydensecrf 的问题求助
source link: https://www.v2ex.com/t/816681
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

查了好多资料都没能行。有的说是因为 system32 不在环境变量,添加进去也没管用。
有的教程让在Visual C++ 2015 x64 Native Build Tools Command Prompt
里运行"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
,这个报错ERROR: Cannot determine the location of the VS Common Tools folder.
。(我确实是 64 位 win10 ,也是管理员身份运行的)
想用 conda 安装,但是 conda 中的 pydensecrf <= py3.7 ,程序是 py3.8 的。
现在就是很走投无路。下面是用 pip 安装时报的错
Building wheels for collected packages: pydensecrf
Building wheel for pydensecrf (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\PyCodeProject\manga-image-translator-main\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Gii\\AppData\\Local\\Temp\\pip-install-y0dj_q4l\\pydensecrf_bbf
5ced7d4e74a039adcdd868c101d0e\\setup.py'"'"'; __file__='"'"'C:\\Users\\Gii\\AppData\\Local\\Temp\\pip-install-y0dj_q4l\\pydensecrf_bbf5ced7d4e74a039adcdd868c101d0e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__
file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel
-d 'C:\Users\Gii\AppData\Local\Temp\pip-wheel-4y5ux1x0'
cwd: C:\Users\Gii\AppData\Local\Temp\pip-install-y0dj_q4l\pydensecrf_bbf5ced7d4e74a039adcdd868c101d0e\
Complete output (70 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pydensecrf
copying pydensecrf\utils.py -> build\lib.win-amd64-3.8\pydensecrf
copying pydensecrf\__init__.py -> build\lib.win-amd64-3.8\pydensecrf
running build_ext
building 'pydensecrf.eigen' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\pydensecrf
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipydensecrf/densecrf/include -Ipydensecrf -ID:\PyCodeProject\manga-image-translator-main\venv\include -IC:\Use
rs\Gii\AppData\Local\Programs\Python\Python38\include -IC:\Users\Gii\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\
include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240
.0\winrt" /EHsc /Tppydensecrf/eigen.cpp /Fobuild\temp.win-amd64-3.8\Release\pydensecrf/eigen.obj
eigen.cpp
pydensecrf/eigen.cpp(15393): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15400): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15407): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15411): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15422): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15431): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(17032): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17033): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17034): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17041): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17042): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17043): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17044): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17045): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17046): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17101): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17102): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17103): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17104): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17105): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17106): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17128): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17129): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17130): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17131): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17132): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17133): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pydensecrf
Running setup.py clean for pydensecrf
Failed to build pydensecrf
Installing collected packages: pydensecrf
Running setup.py install for pydensecrf ... error
ERROR: Command errored out with exit status 1:
command: 'D:\PyCodeProject\manga-image-translator-main\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Gii\\AppData\\Local\\Temp\\pip-install-y0dj_q4l\\pydensecrf_b
bf5ced7d4e74a039adcdd868c101d0e\\setup.py'"'"'; __file__='"'"'C:\\Users\\Gii\\AppData\\Local\\Temp\\pip-install-y0dj_q4l\\pydensecrf_bbf5ced7d4e74a039adcdd868c101d0e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(
__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --
record 'C:\Users\Gii\AppData\Local\Temp\pip-record-wvo03rkf\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\PyCodeProject\manga-image-translator-main\venv\include\site\python3.8\pydense
crf'
cwd: C:\Users\Gii\AppData\Local\Temp\pip-install-y0dj_q4l\pydensecrf_bbf5ced7d4e74a039adcdd868c101d0e\
Complete output (70 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pydensecrf
copying pydensecrf\utils.py -> build\lib.win-amd64-3.8\pydensecrf
copying pydensecrf\__init__.py -> build\lib.win-amd64-3.8\pydensecrf
running build_ext
building 'pydensecrf.eigen' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\pydensecrf
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipydensecrf/densecrf/include -Ipydensecrf -ID:\PyCodeProject\manga-image-translator-main\venv\include -IC:\U
sers\Gii\AppData\Local\Programs\Python\Python38\include -IC:\Users\Gii\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\1
0\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.102
40.0\winrt" /EHsc /Tppydensecrf/eigen.cpp /Fobuild\temp.win-amd64-3.8\Release\pydensecrf/eigen.obj
eigen.cpp
pydensecrf/eigen.cpp(15393): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15400): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15407): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15411): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15422): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(15431): warning C4996: '_typeobject::tp_print': deprecated in 3.8
c:\users\gii\appdata\local\programs\python\python38\include\cpython/object.h(260): note: see declaration of '_typeobject::tp_print'
pydensecrf/eigen.cpp(17032): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17033): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17034): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17041): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17042): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17043): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17044): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17045): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17046): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17101): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17102): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17103): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17104): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17105): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17106): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17128): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17129): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17130): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17131): error C2039: 'exc_type': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17132): error C2039: 'exc_value': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
pydensecrf/eigen.cpp(17133): error C2039: 'exc_traceback': is not a member of '_ts'
c:\users\gii\appdata\local\programs\python\python38\include\cpython/pystate.h(51): note: see declaration of '_ts'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\PyCodeProject\manga-image-translator-main\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Gii\\AppData\\Local\\Temp\\p
ip-install-y0dj_q4l\\pydensecrf_bbf5ced7d4e74a039adcdd868c101d0e\\setup.py'"'"'; __file__='"'"'C:\\Users\\Gii\\AppData\\Local\\Temp\\pip-install-y0dj_q4l\\pydensecrf_bbf5ced7d4e74a039adcdd868c101d0e\\setup.py'"'"';f = getattr
(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __fil
e__, '"'"'exec'"'"'))' install --record 'C:\Users\Gii\AppData\Local\Temp\pip-record-wvo03rkf\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\PyCodeProject\manga-image-translator-main\ve
nv\include\site\python3.8\pydensecrf' Check the logs for full command output.
Recommend
-
12
...
-
3
公司的项目需要用到一个国外的开源 HTML5 项目,可以理解为是一套游戏的底层引擎库+几十个小游戏。使用的方式很简单,在项目里做一个小浏览器,直接在本地打开这些 HTML5 页面。 这个项目的具体情况如下: 第一个部分:已经编译好的独立 H...
-
5
V2EX › Linux [求助] 安装 vim 插件的问题 yiouejv · 8 小时 28 分钟前 · 493 次点击 ...
-
8
求助,关于json反序列化问题 DG9Jww · 大约6小时之前 · 115 次点击 ·...
-
6
V2EX › Linux 关于 nginx 四层转发问题求助 cndns...
-
8
V2EX › 问与答 esxi 安装配置求助 Achophiar...
-
5
V2EX › 硬件 有个关于交换机风扇的问题想求助一下 v 友们
-
3
V2EX › macOS [真心求助贴] 关于 Mac m1 air 充电头的问题
-
6
一切都源于我开发中发现的一个bug,简单描述就是 先insert 了一条数据,然后开启了一个协程,直接进行查询刚才插入的数据,竟然没查到。 func Test(t *testing.T) { record := &model.ContentCoursePracticeRecord{...
-
10
V2EX › 宽带症候群 求助关于 ros v7 获取不了 ipv6 前缀的问题
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK