为Python安装Stanford的SNAP Graph软件包

问题描述 投票:0回答:1

我正在尝试从Stanford.edu安装一个名为SNAP的软件包,但是在Python 3.7环境中使用pip install snap-stanford时,出现错误:

ERROR: Could not find a version that satisfies the requirement snap-stanford (from versions: none)
ERROR: No matching distribution found for snap-stanford

我的下一个尝试是使用setup.py。但是,现在在python导入时出现错误,提示:

(env) MacBook-Pro:graph-api$ python
Python 3.7.0 (default, Mar 15 2020, 00:49:38) 
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import snap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/user/Dropbox/Projects/Development/APIs/api/env/lib/python3.7/site-packages/snap_stanford-5.0.0_dev_macosx10.13.6_x64_py3.7-py3.7.egg/snap.py", line 15, in <module>
    import _snap
ImportError: dlopen(/Users/Dropbox/Projects/Development/APIs/api/env/lib/python3.7/site-packages/snap_stanford-5.0.0_dev_macosx10.13.6_x64_py3.7-py3.7.egg/_snap.so, 2): Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python
  Referenced from: /Users/Dropbox/Projects/Development/APIs/api/env/lib/python3.7/site-packages/snap_stanford-5.0.0_dev_macosx10.13.6_x64_py3.7-py3.7.egg/_snap.so
  Reason: image not found

关于如何解决此问题的任何想法?

我目前在使用Python 3.7.0的MacOS 10.13.6上。

pip installation package snap-python stanford-snap
1个回答
-1
投票

尝试改用pip install snap,可让您导入快照。没有正确安装快照,您将无法import snap

© www.soinside.com 2019 - 2024. All rights reserved.