Conceptnet5 python设置mac OS

时间:2015-12-15 22:25:35

标签: python

我正在尝试在mac上本地安装conceptnet。

我采用了高带宽,低计算方式https://github.com/commonsense/conceptnet5/wiki/Running-your-own-copy并执行了以下操作:

git clone https://github.com/commonsense/conceptnet5
pyvenv-3.4 conceptnet-env
source conceptnet-env/bin/activate
cd conceptnet5
python setup.py develop
make download_db

然后在最后一步我收到以下错误:

命令

ln -s `readlink -f data` ~/.conceptnet5

输出

readlink: illegal option -- f
usage: readlink [-n] [file ...]

所以我确实忽略了这一步,因为我看过一个谷歌讨论提出了另一种方法(因为链接命令对我不起作用)

所以从这次讨论https://github.com/commonsense/conceptnet5/issues/33我尝试了以下内容:

CONCEPTNET_DATA=~/conceptnet5/data/
export CONCEPTNET_DATA

但这不起作用,导致执行以下操作:

from conceptnet5.query import lookup
lookup('/c/en/examples')

我收到以下错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/arj/Desktop/app/conceptnet5/conceptnet5/query.py", line 75, in lookup
    self.load_index()
  File "/Users/arj/Desktop/app/conceptnet5/conceptnet5/query.py", line 58, in load_index
    self._db_filename, self._edge_dir, self.nshards
  File "/Users/arj/Desktop/app/conceptnet5/conceptnet5/formats/sql.py", line 211, in __init__
    self._connect()
  File "/Users/arj/Desktop/app/conceptnet5/conceptnet5/formats/sql.py", line 216, in _connect
    self.dbs[i] = sqlite3.connect(filename)
sqlite3.OperationalError: unable to open database file

ln命令的操作系统应该是什么?

或者我还能为conceptnet做些什么来找到数据库文件?

0 个答案:

没有答案