尝试为Python安装boilerpipe3的问题是什么?

时间:2019-06-03 10:46:05

标签: python-3.x setuptools python-wheel jpype boilerpipe

我希望在三个场所(PC或服务器)安装Python的boilerpipe3。每个场所都运行Windows 10和Python 3,并且每个场所都设置了几乎相同的环境。我已经在两个地点安装了boilerpipe3(通过pip install),但是在第三个地点一直遇到问题。我很难理解这次是什么问题。

这是我尝试在安装了Python 3且可以正常运行的Windows 10 PC上通过pip install安装boilerpipe3时收到的错误消息(几条注释之后)。

注意:

我意识到JPype1-py3的要求似乎已被JPype1 0.6.3取代,因此我继续正确地安装了它,然后尝试点安装锅炉模型3,但这没有用。

我还确保安装了最新版本的pip == 19.1.1,setuptools == 41.0.1和wheel == 0.33.4。更新所有这些都不能解决问题。

我还安装了Visual Studio Code 1.23.1和Visual Studio Build Tools 2019 16.1.1。我还安装了Java \ jdk \ 12.0.1,并将系统变量路径设置为C:\ Program Files \ Java \ jdk-12.0.1 \ bin,并将JAVA_HOME环境变量设置为C:\ Program Files \ Java \ jdk- 12.0.1 \ bin。

这是很多信息,但是我必须确保所有这些都到位,以使boilerpipe3在其他两个场所都能正常工作。

更多说明:

我还想知道mingw-w64软件包是否引起了任何问题,因此我尝试删除此软件包以及与之相关的所有路径和变量,但这也没有导致boilerpipe3正确安装。

这是我尝试点子安装boilerpipe3时收到的错误消息:

Collecting boilerpipe3
Requirement already satisfied: charade in c:\users\xxx\anaconda3\lib\site-packages (from boilerpipe3) (1.0.3)
Collecting JPype1-py3 (from boilerpipe3)
  Using cached https://files.pythonhosted.org/packages/9b/81/63f5e4202c598f362ee4684b41890f993d6e58309c5d90703f570ab85f62/JPype1-py3-0.5.5.4.tar.gz
Building wheels for collected packages: JPype1-py3
  Building wheel for JPype1-py3 (setup.py) ... error
  ERROR: Complete output from command 'c:\users\xxx\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-he625h71\\JPype1-py3\\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\xxx\AppData\Local\Temp\pip-wheel-a8c77x3_' --python-tag cp36:
  ERROR:
  ********* DEPRECATION WARNING *********
  Warning: This version of JPype is now deprecated, see issue #29 for more details
  Warning:     https://github.com/tcalmant/jpype-py3/issues/29
  Warning:
  Warning: Please use this version instead:
  Warning:     https://github.com/jpype-project/jpype
  Warning:
  Warning: It can be installed using:
  Warning:     pip install JPype1
  ********* DEPRECATION WARNING *********

  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\jpype
  copying jpype\JClassUtil.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\nio.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\reflect.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_core.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_cygwin.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_darwin.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_gui.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jarray.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jclass.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jcollection.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jexception.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jobject.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jpackage.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jproxy.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jvmfinder.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_jwrapper.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_linux.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_properties.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_pykeywords.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_refdaemon.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\_windows.py -> build\lib.win-amd64-3.6\jpype
  copying jpype\__init__.py -> build\lib.win-amd64-3.6\jpype
  creating build\lib.win-amd64-3.6\jpype\awt
  copying jpype\awt\__init__.py -> build\lib.win-amd64-3.6\jpype\awt
  creating build\lib.win-amd64-3.6\jpype\awt\event
  copying jpype\awt\event\WindowAdapter.py -> build\lib.win-amd64-3.6\jpype\awt\event
  copying jpype\awt\event\__init__.py -> build\lib.win-amd64-3.6\jpype\awt\event
  creating build\lib.win-amd64-3.6\jpypex
  copying jpypex\__init__.py -> build\lib.win-amd64-3.6\jpypex
  creating build\lib.win-amd64-3.6\jpypex\swing
  copying jpypex\swing\AbstractAction.py -> build\lib.win-amd64-3.6\jpypex\swing
  copying jpypex\swing\pyutils.py -> build\lib.win-amd64-3.6\jpypex\swing
  copying jpypex\swing\__init__.py -> build\lib.win-amd64-3.6\jpypex\swing
  running build_ext
  building '_jpype' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\native
  creating build\temp.win-amd64-3.6\Release\native\common
  creating build\temp.win-amd64-3.6\Release\native\python
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_array.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_array.o
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_arrayclass.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_arrayclass.o
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_class.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_class.o
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_classbase.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_classbase.o
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_env.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_env.o
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_field.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_field.o
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_invocationhandler.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_invocationhandler.o
  C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_javaenv.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_javaenv.o
  In file included from native\common\jp_javaenv.cpp:17:0:
  native\common\jp_javaenv.cpp: In member function '_jobject* JPJavaEnv::NewDirectByteBuffer(void*, jlong)':
  native\common\jp_javaenv.cpp:285:15: error: cast from 'jobject {aka _jobject*}' to 'long int' loses precision [-fpermissive]
    TRACE1((long)res);
                 ^
  native\common\include/jpype.h:28:32: note: in definition of macro 'TRACE1'
   #define TRACE1(m) _trace.trace(m)
                                  ^
  error: command 'C:\\Users\\xxx\\Anaconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for JPype1-py3
  Running setup.py clean for JPype1-py3
Failed to build JPype1-py3
Installing collected packages: JPype1-py3, boilerpipe3
  Running setup.py install for JPype1-py3 ... error
    ERROR: Complete output from command 'c:\users\xxx\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-he625h71\\JPype1-py3\\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\xxx\AppData\Local\Temp\pip-record-f1q8vk2r\install-record.txt' --single-version-externally-managed --compile:
    ERROR:
    ********* DEPRECATION WARNING *********
    Warning: This version of JPype is now deprecated, see issue #29 for more details
    Warning:     https://github.com/tcalmant/jpype-py3/issues/29
    Warning:
    Warning: Please use this version instead:
    Warning:     https://github.com/jpype-project/jpype
    Warning:
    Warning: It can be installed using:
    Warning:     pip install JPype1
    ********* DEPRECATION WARNING *********

    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\jpype
    copying jpype\JClassUtil.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\nio.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\reflect.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_core.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_cygwin.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_darwin.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_gui.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jarray.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jclass.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jcollection.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jexception.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jobject.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jpackage.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jproxy.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jvmfinder.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_jwrapper.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_linux.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_properties.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_pykeywords.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_refdaemon.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\_windows.py -> build\lib.win-amd64-3.6\jpype
    copying jpype\__init__.py -> build\lib.win-amd64-3.6\jpype
    creating build\lib.win-amd64-3.6\jpype\awt
    copying jpype\awt\__init__.py -> build\lib.win-amd64-3.6\jpype\awt
    creating build\lib.win-amd64-3.6\jpype\awt\event
    copying jpype\awt\event\WindowAdapter.py -> build\lib.win-amd64-3.6\jpype\awt\event
    copying jpype\awt\event\__init__.py -> build\lib.win-amd64-3.6\jpype\awt\event
    creating build\lib.win-amd64-3.6\jpypex
    copying jpypex\__init__.py -> build\lib.win-amd64-3.6\jpypex
    creating build\lib.win-amd64-3.6\jpypex\swing
    copying jpypex\swing\AbstractAction.py -> build\lib.win-amd64-3.6\jpypex\swing
    copying jpypex\swing\pyutils.py -> build\lib.win-amd64-3.6\jpypex\swing
    copying jpypex\swing\__init__.py -> build\lib.win-amd64-3.6\jpypex\swing
    running build_ext
    building '_jpype' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\native
    creating build\temp.win-amd64-3.6\Release\native\common
    creating build\temp.win-amd64-3.6\Release\native\python
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_array.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_array.o
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_arrayclass.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_arrayclass.o
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_class.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_class.o
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_classbase.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_classbase.o
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_env.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_env.o
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_field.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_field.o
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_invocationhandler.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_invocationhandler.o
    C:\Users\xxx\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DWIN32=1 -Inative\common\include -Inative\python\include "-IC:\Program Files\Java\jdk-12.0.1\include" "-IC:\Program Files\Java\jdk-12.0.1\include\win32" -Ic:\users\xxx\anaconda3\include -Ic:\users\xxx\anaconda3\include -c native\common\jp_javaenv.cpp -o build\temp.win-amd64-3.6\Release\native\common\jp_javaenv.o
    In file included from native\common\jp_javaenv.cpp:17:0:
    native\common\jp_javaenv.cpp: In member function '_jobject* JPJavaEnv::NewDirectByteBuffer(void*, jlong)':
    native\common\jp_javaenv.cpp:285:15: error: cast from 'jobject {aka _jobject*}' to 'long int' loses precision [-fpermissive]
      TRACE1((long)res);
                   ^
    native\common\include/jpype.h:28:32: note: in definition of macro 'TRACE1'
     #define TRACE1(m) _trace.trace(m)
                                    ^
    error: command 'C:\\Users\\xxx\\Anaconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with exit status 1
    ----------------------------------------
ERROR: Command "'c:\users\xxx\anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-he625h71\\JPype1-py3\\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\xxx\AppData\Local\Temp\pip-record-f1q8vk2r\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\xxx\AppData\Local\Temp\pip-install-he625h71\JPype1-py3\

我正在努力了解导致此问题无法正确安装的问题所在,尤其是因为到目前为止,我已经设法将其安装在其他两个场所!在此,我将不胜感激任何帮助该安装和工作的帮助!谢谢!

1 个答案:

答案 0 :(得分:0)

我仍然没有弄清楚问题的细节,但是设法通过我发现的“ fix”包安装了pipeterpipe:boilerpipe3-fix 1.1。可以通过以下方式进行安装:pip install锅炉pipe3-fix,它确实使用JPype1作为依赖项,而不是将其标记为弃用JPype1-py3。

显然有一个似乎已解决的问题。最初的尝试在另外两个场所中起作用,但似乎仍然很奇怪,但在第三个场所中却没有。