我使用的教程如下:https://heasarc.gsfc.nasa.gov/xanadu/xspec/python/html/buildinstall.html
我已经在..Once HEASOFT is finished building and installing, you should find PyXspec’s code files and lib_pyXspec.so library in the directory $HEADAS/lib/python/xspec.之前完成了安装
但是,当我运行$HEADAS/headas-init.csh时,它要求超级用户权限,而当我使用sudo时,它给我一个错误,说找不到命令。然后我尝试使用以下命令手动设置PYTHONPATH环境:
>>> sys.path
['', '/usr/local/lib/python2.7/dist-packages/pyds9-1.9.dev0-py2.7-linux-x86_64.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
>>>
>>> sys.path.append("$HEADAS/lib/python")
>>> import xspec
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xspec/__init__.py", line 66, in <module>
from .chain import ChainManager, AllChains, Chain
File "xspec/chain.py", line 4, in <module>
from . import _pyXspec
ImportError: libXSUser.so: cannot open shared object file: No such file or directory但这也不起作用。如何安装此软件?
谢谢
发布于 2017-08-11 08:52:44
据我所知,这看起来可能是sys.path执行搜索的方式的问题。
我能找到的关于这个问题的两个最相关的帖子是:
http://askubuntu.com/questions/593333
和Why can't Python find shared objects that are in directories in sys.path?
https://stackoverflow.com/questions/45624768
复制相似问题