Ошибка object of type 'NoneType' has no len() при установке pyjnius

получаю ошибку при установке pyjnius через командную строку

C:\Windows\System32>pip install pyjnius
Downloading/unpacking pyjnius
  Running setup.py (path:c:\users\alexk\appdata\local\temp\pip_build_AlexK\pyjni
us\setup.py) egg_info for package pyjnius
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "c:\users\alexk\appdata\local\temp\pip_build_AlexK\pyjnius\setup.py",
 line 63, in <module>
        include_dirs = [ join(jdk_home, 'include'), join(jdk_home, 'include', pl
atform)]
      File "C:\Python27\lib\ntpath.py", line 64, in join
        result_drive, result_path = splitdrive(path)
      File "C:\Python27\lib\ntpath.py", line 114, in splitdrive
        if len(p) > 1:
    TypeError: object of type 'NoneType' has no len()
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "c:\users\alexk\appdata\local\temp\pip_build_AlexK\pyjnius\setup.py", lin
e 63, in <module>

    include_dirs = [ join(jdk_home, 'include'), join(jdk_home, 'include', platfo
rm)]

  File "C:\Python27\lib\ntpath.py", line 64, in join

    result_drive, result_path = splitdrive(path)

  File "C:\Python27\lib\ntpath.py", line 114, in splitdrive

    if len(p) > 1:

TypeError: object of type 'NoneType' has no len()

Не могу понять в чем причина ?

Разбанили, отвечаю.
Попробуйте так и отпишитесь о результате:

pip install cython
pip install git+git://github.com/kivy/pyjnius.git

что за команда git ?
Получаю вот такое в командной строке

C:\Windows\System32>pip install cython
Requirement already satisfied (use --upgrade to upgrade): cython in c:\python27\
lib\site-packages
Cleaning up...

C:\Windows\System32>pip install git+git://github.com/kivy/pyjnius.git
Downloading/unpacking git+git://github.com/kivy/pyjnius.git
  Cloning git://github.com/kivy/pyjnius.git to c:\users\alexk\appdata\local\temp
\pip-p60_wm-build
Cleaning up...
Cannot find command 'git'

Использую win8
Дополнительно установил jre и в системных параметрах установил

SET VS90COMNTOOLS=%VS100COMNTOOLS%
SET JDK_HOME=<path to the JDK installation directory>
SET JAVA_HOME=%JDK_HOME%
SET PATH=%JDK_HOME%\jre\bin\server;%PATH%

Сейчас получаю вот такое предупреждение

C:\Windows\System32>pip install pyjnius
Downloading/unpacking pyjnius
  Running setup.py (path:c:\users\alexk\appdata\local\temp\pip_build_AlexK\pyjni
us\setup.py) egg_info for package pyjnius

    warning: no files found matching '*COPYING'
Installing collected packages: pyjnius
  Running setup.py install for pyjnius
    skipping 'jnius\jnius.c' Cython extension (up-to-date)
    building 'jnius' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\alexk\appdata\local\temp\pip_build_AlexK\pyjnius\setup.py",
 line 154, in <module>
        'Topic :: Software Development :: Libraries :: Application Frameworks'])

      File "C:\Python27\lib\distutils\core.py", line 151, in setup
        dist.run_commands()
      File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "build\bdist.win32\egg\setuptools\command\install.py", line 61, in ru
n
      File "C:\Python27\lib\distutils\command\install.py", line 563, in run
        self.run_command('build')
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\distutils\command\build.py", line 127, in run
        self.run_command(cmd_name)
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\Cython\Distutils\build_ext.py", line 1
63, in run
        _build_ext.build_ext.run(self)
      File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
        self.build_extensions()
      File "C:\Python27\lib\site-packages\Cython\Distutils\build_ext.py", line 1
71, in build_extensions
        self.build_extension(ext)
      File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in build_
extension
        depends=ext.depends)
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
        self.initialize()
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize

        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcva
rsall
        raise ValueError(str(list(result.keys())))
    ValueError: [u'path']
    Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\alexk\\appdata\\local\\temp\\pip_build_AlexK\\pyjni
us\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().repl
ace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\alexk\appdata\l
ocal\temp\pip-4yd70b-record\install-record.txt --single-version-externally-manag
ed --compile:
    running install

running build

running build_py

creating build

creating build\lib.win32-2.7

creating build\lib.win32-2.7\jnius

copying jnius\reflect.py -> build\lib.win32-2.7\jnius

copying jnius\__init__.py -> build\lib.win32-2.7\jnius

running build_ext

skipping 'jnius\jnius.c' Cython extension (up-to-date)

building 'jnius' extension

Traceback (most recent call last):

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

  File "c:\users\alexk\appdata\local\temp\pip_build_AlexK\pyjnius\setup.py", lin
e 154, in <module>

    'Topic :: Software Development :: Libraries :: Application Frameworks'])

  File "C:\Python27\lib\distutils\core.py", line 151, in setup

    dist.run_commands()

  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands

    self.run_command(cmd)

  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command

    cmd_obj.run()

  File "build\bdist.win32\egg\setuptools\command\install.py", line 61, in run

  File "C:\Python27\lib\distutils\command\install.py", line 563, in run

    self.run_command('build')

  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command

    self.distribution.run_command(command)

  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command

    cmd_obj.run()

  File "C:\Python27\lib\distutils\command\build.py", line 127, in run

    self.run_command(cmd_name)

  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command

    self.distribution.run_command(command)

  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command

    cmd_obj.run()

  File "C:\Python27\lib\site-packages\Cython\Distutils\build_ext.py", line 163,
in run

    _build_ext.build_ext.run(self)

  File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run

    self.build_extensions()

  File "C:\Python27\lib\site-packages\Cython\Distutils\build_ext.py", line 171,
in build_extensions

    self.build_extension(ext)

  File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in build_exte
nsion

    depends=ext.depends)

  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile

    self.initialize()

  File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize

    vc_env = query_vcvarsall(VERSION, plat_spec)

  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsal
l

    raise ValueError(str(list(result.keys())))

ValueError: [u'path']

Аналогично, если C:\Windows\System32>pip install jnius

Может есть подробная инструкция ?

У вас установлена какая-то MS Visual Studio с С++ компилятором? Если нет, установите, можно экспресс.
Если установлена VS 2010, перед pip install сделайте:

SET VS90COMNTOOLS=%VS100COMNTOOLS%

Visual Studio 2012 (Visual Studio Version 11)

SET VS90COMNTOOLS=%VS110COMNTOOLS%

Visual Studio 2013(Visual Studio Version 12)

SET VS90COMNTOOLS=%VS120COMNTOOLS%
  1. Установил VS2010 C++ express edition – я так понимаю C++ компилятор уже там есть.
  2. SET VS90COMNTOOLS=%VS100COMNTOOLS%

получаю

jnius.c

C:\Program Files\Java\jdk1.8.0_20\include\jni.h(45) : fatal error C1083: Cannot
open include file: 'jni_md.h': No such file or directory

error: command 'C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe
' failed with exit status 2


Немного выше должна быть причина ошибки. Статус 2 - это ошибка инклуда какой-то шапки hpp. Раз уж это питон, то проверьте есть ли у вас в переменной среды PATH пути к папкам Python (C:\Python27 (?))

в PATH установлено C:\Python27;C:\Python27\Scripts
Проблема в отсутствии jni_md.h в jdk

Из этого поста
https://developer.ibm.com/answers/questions/4997/when-make-application-throws-jni_mdhno-such-file-or-directory-error/
говорят что смогли решить проблемму добавив путь к jdk/jre/bin в переменную PATH

Я сомневаюсь, что поможет, но попробуйте. А заодно посмотрите как и откудова jni.h в 45-й строке инклудит файл jni_md.h . Проверьте, есть ли этот файл в фолдере инклуда.
Не могу вам точно назвать пути к файлам, так как у меня не стоит jdk.