0

There are three venues (PCs or Severs) where I wish to install boilerpipe3 for Python. Each venue is running Windows 10, Python 3 and has almost the same environment set up in each. I have manged to install boilerpipe3 (via pip install) in two venues, but keep encountering a problem in the third. I am having a hard time understanding what the problem is this time around.

Here is the error message (after a few notes) that I receive when I attempt to install boilerpipe3 via pip install on a Windows 10 PC with Python 3 installed and fully working.

Notes:

I realise that the requirement of JPype1-py3 seems to be deprecated in favour of JPype1 0.6.3, so I went ahead and installed this correctly and then tried to pip install boilerpipe3, but this did not work.

Also I have ensured that I have the latest version of pip==19.1.1, setuptools==41.0.1 and wheel==0.33.4 installed. Updating all of these did not solve the problem.

Further I have Visual Studio Code 1.23.1 and Visual Studio Build Tools 2019 16.1.1 installed. I also have Java\jdk\12.0.1 installed with the system variable path set to C:\Program Files\Java\jdk-12.0.1\bin and the JAVA_HOME environment variable set to C:\Program Files\Java\jdk-12.0.1\bin.

That is a lot of information, but I had to ensure all of this was in place to get boilerpipe3 working in the two other venues.

Further Notes:

I was also wondering whether the mingw-w64 package was causing any issues, so I have tried removing this and all the paths and variables related to it, but this did not result in boilerpipe3 installing properly either.

Here is the error message that I receive on attempting to pip install 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\

I am struggling to understand what the problem is here that is preventing this from installing correctly, especially since I have managed to install it in two other venues so far! I would appreciate any help here that should help to get this installed and working! Thanks!

agftrading
  • 784
  • 3
  • 8
  • 21

1 Answers1

0

I still have not figured out the detail of the problem, but have managed to install boilerpipe instead via the "fix" package that I found: boilerpipe3-fix 1.1. This installed fine via: pip install boilerpipe3-fix and it did use JPype1 as the dependency instead of the marked for deprecation JPype1-py3.

There was obviously an issue that appears to have been fixed. Though still seems strange that the original attempts worked in two other venues, but not in the third.

agftrading
  • 784
  • 3
  • 8
  • 21