使用Pip错误安装Javabridge

时间:2018-01-18 20:36:59

标签: python python-3.x pip subprocess libraries

我正在尝试安装microscoper库,除了我在安装时遇到问题的javabridge依赖项外,我已经完成了所有工作。每次我尝试自己安装javabridge时,都会收到以下错误消息:

C:\>pip install javabridge
Collecting javabridge  
Using cached javabridge-1.0.15.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\<My Username Abbrv>\AppData\Local\Temp\pip-build-s902jjra\javabridge\setup.py", line 393, in <module>
    ext_modules=ext_modules(),
  File "C:\Users\<My Username Abbrv>\AppData\Local\Temp\pip-build-s902jjra\javabridge\setup.py", line 114, in ext_modules
    p = subprocess.Popen(cmd)
  File "c:\users\<My Username>\appdata\local\programs\python\python36\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "c:\users\<My Username>\appdata\local\programs\python\python36\lib\subprocess.py", line 997, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\<My Username Abbrv>\AppData\Local\Temp\pip-build-s902jjra\javabridge\

如果有人对如何解决这个问题以及安装javabridge依赖关系有任何建议,我将非常感激。

2 个答案:

答案 0 :(得分:0)

setup.py无法从MinGW运行gendef。也许它不在PATH中。将MinGW目录添加到PATH并重试。

答案 1 :(得分:0)

尝试使用这些命令,这有助于解决此错误的问题。

set MSSdk=1
set DISTUTILS_USE_SDK=1
pip install javabridge