为了账号安全,请及时绑定邮箱和手机立即绑定

无法 pip 安装 javabridge

无法 pip 安装 javabridge

开心每一天1111 2021-06-29 17:00:23
Ubuntu 18.04,蟒蛇 2.7我试试sudo pip install javabridge我得到      Complete output from command python setup.py egg_info:Traceback (most recent call last):  File "<string>", line 1, in <module>  File "/tmp/pip-install-voWMrv/javabridge/setup.py", line 396, in <module>    ext_modules=ext_modules(),  File "/tmp/pip-install-voWMrv/javabridge/setup.py", line 131, in ext_modules    library_dirs = [os.path.dirname(jvm_so)]  File "/usr/lib/python2.7/posixpath.py", line 122, in dirname    i = p.rfind('/') + 1AttributeError: 'NoneType' object has no attribute 'rfind'----------------------------------------命令“python setup.py egg_info”在 /tmp/pip-install-voWMrv/javabridge/ 中失败,错误代码为 1我能够做到sudo pip install javabridge==1.0.16但事实证明我需要最新的 1.0.17,为此我仍然收到上述错误。这个命令find /usr/lib/jvm/java-11-openjdk-amd64 -type f -name "*jvm.so"给/usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so然后我跑了JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64~$ JDK_HOME=/usr/lib/jvm/java-11-openjdk-amd64最后sudo pip install javabridge --user myName给出同样的错误Complete output from command python setup.py egg_info:    Traceback (most recent call last):      File "<string>", line 1, in <module>      File "/tmp/pip-install-i61jKx/javabridge/setup.py", line 396, in <module>        ext_modules=ext_modules(),      File "/tmp/pip-install-i61jKx/javabridge/setup.py", line 131, in ext_modules        library_dirs = [os.path.dirname(jvm_so)]      File "/usr/lib/python2.7/posixpath.py", line 122, in dirname        i = p.rfind('/') + 1    AttributeError: 'NoneType' object has no attribute 'rfind'我也试过JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 JDK_HOME=/usr/lib/jvm/java-11-openjdk-amd64 pip install javabridge --user
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 260 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信