gpt4 book ai didi

python - PyKEP python 开普勒工具箱

转载 作者:行者123 更新时间:2023-12-01 05:44:42 24 4
gpt4 key购买 nike

我按照安装 python keplerian 工具箱的说明进行操作,一切顺利,但在尝试导入模块时出现问题。

我遵循的说明:keptoolbox

有人知道我该如何解决这个问题吗?

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/PyKEP/__init__.py", line 1, in <module>
import core, sims_flanagan
File "/usr/local/lib/python2.7/dist-packages/PyKEP/core/__init__.py", line 2, in <module>
from _core import *
ImportError: libkeplerian_toolbox.so: cannot open shared object file: No such file or directory

文件libkeplerian_toolbox.so位于/usr/local/lib/libkeplerian_toolbox.so。我需要复制到其他地方吗?

所有内容都安装在正确的目录中:

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libkeplerian_toolbox.so
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/core/_core.so
-- Removed runtime path from "/usr/local/lib/python2.7/dist-packages/PyKEP/core/_core.so"
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/core/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/sims_flanagan/_sims_flanagan.so
-- Removed runtime path from "/usr/local/lib/python2.7/dist-packages/PyKEP/sims_flanagan/_sims_flanagan.so"
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/sims_flanagan/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/orbit_plots/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/orbit_plots/_plots.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/examples/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/examples/_ex1.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/examples/_ex2.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/examples/_ex3.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/examples/_ex4.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/examples/_ex5.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/interplanetary/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/PyKEP/interplanetary/_mga_1dsm.py

最佳答案

这是一个链接问题,ldconfig默认不会在/usr/local/lib中查找,所以你需要将其添加到文件/etc/ld.so.conf (只需将其放在 include 语句下即可)。现在运行

ldconfig

错误应该消失了。

关于python - PyKEP python 开普勒工具箱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16476986/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com