Can't install pyjnius 1.12

224 views
Skip to first unread message

J. Z. D.

unread,
Sep 30, 2019, 1:17:08 PM9/30/19
to Kivy users support

Hello,


Thank you for trying to help me !

 

I'm actually trying to make an application, controlling bluetooth relay,

 

I'm on Windows 10, I got updated JDK and JRE, then installed without any problem kivy and cython,


But installing pyjnius, I've got a lot of error, is it about x64 ? still about java ?

 

This is my latest error, but i can’t know what to try next !

 

Thanks again !

 

Jzd

 

 

  ERROR: Command errored out with exit status 1:

     command: 'c:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\J\\AppData\\Local\\Temp\\pip-install-h2greq5a\\pyjnius\\setup.py'"'"'; __file__='"'"'C:\\Users\\J\\AppData\\Local\\Temp\\pip-install-h2greq5a\\pyjnius\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info

         cwd: C:\Users\J\AppData\Local\Temp\pip-install-h2greq5a\pyjnius\

    Complete output (19 lines):

    warning: [options] bootstrap class path not set in conjunction with -source 6

    error: Source option 6 is no longer supported. Use 7 or later.

    error: Target option 6 is no longer supported. Use 7 or later.

    C:\Program Files\Java\jdk-13\bin

    WARNING: Not able to assign machine() = AMD64 to a cpu value!

             Using cpu = 'i386' instead!

    JDK_HOME: C:\Program Files\Java\jdk-13

 

    JRE_HOME: None

 

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "C:\Users\J\AppData\Local\Temp\pip-install-h2greq5a\pyjnius\setup.py", line 246, in <module>

        compile_native_invocation_handler(JDK_HOME, JRE_HOME)

      File "C:\Users\J\AppData\Local\Temp\pip-install-h2greq5a\pyjnius\setup.py", line 96, in compile_native_invocation_handler

        join('jnius', 'src', 'org', 'jnius', 'NativeInvocationHandler.java')

      File "c:\python\lib\subprocess.py", line 347, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['C:\\Program Files\\Java\\jdk-13\\bin\\javac.exe', '-target', '1.6', '-source', '1.6', 'jnius\\src\\org\\jnius\\NativeInvocationHandler.java']' returned non-zero exit status 2.

    ----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

 

 

J. Z. D.

unread,
Sep 30, 2019, 1:29:12 PM9/30/19
to Kivy users support
I should precise, I'm using Python 3.7, 64 bits (like Windows), JDK-13, JRE-1.8.0_221.

Alexander Taylor

unread,
Sep 30, 2019, 5:05:29 PM9/30/19
to Kivy users support
Do you actually want to use pyjnius on the desktop, or on Android?

J. Z. D.

unread,
Sep 30, 2019, 8:51:45 PM9/30/19
to Kivy users support
Hey, on the computer to make the application program.

ZenCODE

unread,
Oct 2, 2019, 3:34:32 PM10/2/19
to Kivy users support
Try using JDK-8? That version should work?

Emilia J

unread,
Jan 29, 2020, 5:26:15 PM1/29/20
to Kivy users support
Hello.
I also can't install pyjnius -.- I've been trying to figure it out for a few hours :/ 
cmdenviron.JPG

setuptools up-to-date

But I still get the error:

C:\Users\Emilia>pip install pyjnius
Collecting pyjnius
  Using cached pyjnius-1.2.1.tar.gz (40 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\python37-32\python.exe' -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\Emilia\\AppData\\Local\\Temp\\pip-install-bd5aw_wq
\\pyjnius\\setup.py'"'"'; __file__='"'"'C:\\Users\\Emilia\\AppData\\Local\\Temp\
\pip-install-bd5aw_wq\\pyjnius\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"'
, open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();
exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Emi
lia\AppData\Local\Temp\pip-install-bd5aw_wq\pyjnius\pip-egg-info'
         cwd: C:\Users\Emilia\AppData\Local\Temp\pip-install-bd5aw_wq\pyjnius\
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Emilia\AppData\Local\Temp\pip-install-bd5aw_wq\pyjnius\setu
p.py", line 92, in <module>
        compile_native_invocation_handler(*get_possible_homes(PLATFORM))
      File "C:\Users\Emilia\AppData\Local\Temp\pip-install-bd5aw_wq\pyjnius\setu
p.py", line 79, in compile_native_invocation_handler
        javac = find_javac(PLATFORM, possible_homes)
      File "jnius\env.py", line 37, in find_javac
        for javac in [join(home, name), join(home, 'bin', name)]:
      File "c:\python37-32\lib\ntpath.py", line 76, in join
        path = os.fspath(path)
    TypeError: expected str, bytes or os.PathLike object, not NoneType
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.

What else am I supposed to do?

Robert Flatt

unread,
Jan 30, 2020, 3:18:00 PM1/30/20
to Kivy users support
I tried installing pyjnius on Windows

Python 3.6 and Java SE development kit installed - installs OK
Python 3.8 no Java SE   - install fails "unable to find JAVA_HOME" , as expected because Java SE is not installed.

So the could be python version related, or not - more testing needed.
Or I notice that my Python 3.6 machine does not have %JAVA_HOME% , %JDK_HOME%, or %JSE_HOME% defined (as shown by echo)

So un-defining these would be something to try, as the error messages are about finding "possible_homes"

Emilia J

unread,
Jan 30, 2020, 6:52:26 PM1/30/20
to Kivy users support
Thank you for your reply, but environment variables are set. os.environ.get() works and can find JAVA_HOME, JDK_HOME etc., so it must be something else.
Btw I use Python 3.7, but JRE is installed, so i'll try to install JDK.

Robert Flatt

unread,
Jan 30, 2020, 10:45:54 PM1/30/20
to Kivy users support
Perhaps I was not clear.
I get that the *_HOME variables are set.
Try unsetting them, though sensible to you and me that they should be set, perhaps not to the install (as shown by not required on my machine)

And yes Python version is a possibility, but at this point insufficient evidence.

Emilia J

unread,
Jan 31, 2020, 8:01:17 AM1/31/20
to Kivy users support
But when the variables were not set, I got the JAVA_HOME or JDK_HOME error. 
I tried with JDK 8 and 13 and there is still the error "PermissionError: [WinError 5] Access is denied":


Collecting pyjnius
    Complete output from command python setup.py egg_info:
    C:\Program Files\Java\jdk1.8.0_241\bin
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Emilia\AppData\Local\Temp\pycharm-packaging\pyjnius\setup.py", line 92, in <module>
        compile_native_invocation_handler(*get_possible_homes(PLATFORM))
      File "C:\Users\Emilia\AppData\Local\Temp\pycharm-packaging\pyjnius\setup.py", line 84, in compile_native_invocation_handler
        join('jnius', 'src', 'org', 'jnius', 'NativeInvocationHandler.java')
      File "C:\Python37-32\lib\subprocess.py", line 358, in check_call
        retcode = call(*popenargs, **kwargs)
      File "C:\Python37-32\lib\subprocess.py", line 339, in call
        with Popen(*popenargs, **kwargs) as p:
      File "C:\Python37-32\lib\subprocess.py", line 800, in __init__
        restore_signals, start_new_session)
      File "C:\Python37-32\lib\subprocess.py", line 1207, in _execute_child
        startupinfo)
    PermissionError: [WinError 5] Odmowa dostępu
    
    ----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Emilia\AppData\Local\Temp\pycharm-packaging\pyjnius\

Robert Flatt

unread,
Jan 31, 2020, 12:25:24 PM1/31/20
to Kivy users support
I reinstalled pyjnius and notice the file pip used is a wheel not a tar file. Your pip acting like Linux not Windows.

My pip gets:

Is there more than one pip on the system?
pip --version
will show the file is actually being used

Emilia J

unread,
Jan 31, 2020, 2:22:53 PM1/31/20
to kivy-...@googlegroups.com
I tried this wheel, but no changes. I upgraded pip a few days ago, so it's up-to-date. I also thought that there may be a problem with pip and I checked it, but everything seems right.

pip --version >> pip 20.0.2 from c:\python37-32\lib\site-packages\pip (python 3.7)

and I don't see any other version in C:\Python37-32\Lib\site-packages. 

Maybe pycharm still uses that older version?


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/acec176a-d5f3-4a96-96bd-050b87cb8a50%40googlegroups.com.

Robert Flatt

unread,
Jan 31, 2020, 2:50:23 PM1/31/20
to Kivy users support
That wheel is not going to work for you because it is 64 bit, and your python is 32 bit

Is there a pip elsewhere, such as GunWin32?  Look at all the path entries.

I don't understand the reference to pycharm (which I don't use), I'm assuming the behavior is from the cmd prompt.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.

Emilia J

unread,
Jan 31, 2020, 8:00:03 PM1/31/20
to Kivy users support
Idk why I installed python 32-bit not 64-bit, but however I have both xD 64bit is shared by Microsoft Visual Studio and there is the previous version of pip.
Does it cause the problem?

Emilia J

unread,
Feb 1, 2020, 7:50:44 AM2/1/20
to Kivy users support
I reinstall python and pyjnius was installed successfully, but I see there is some problem with pip. Python has default pip version -19.2.3 and when I upgraded that, pip didn't replace with pip 20.0.2 in site-packages directory, so if I use a general command pip install, there older version is invoked, but python -m pip install uses 20.0.2, so generally it's ok.
Reply all
Reply to author
Forward
0 new messages