问题
I'm trying to install the microscoper library and I've gotten everything to work except its javabridge dependency which I have had trouble installing. Everytime I try to install javabridge on its own I get the following error message:
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\
If anyone had any advice on how I could fix this and install the javabridge dependency I would be greatly appreciative.
回答1:
setup.py
cannot run gendef from MinGW. Perhaps it's not in the PATH. Add MinGW directories to PATH and retry.
回答2:
Try using these commands, this helped solve my problem for this error.
set MSSdk=1
set DISTUTILS_USE_SDK=1
pip install javabridge
来源:https://stackoverflow.com/questions/48329888/installing-javabridge-with-pip-error