Closed FlorianPfisterer closed 5 years ago
It looks like you did it the right way, but something went wrong. My guess is that pysling.so
file is missing in the python directory.
The setup.sh
script will create a symbolic link from /usr/lib/python3/dist-packages/sling
to the python
subdirectory in your repo directory (unless this directory already exists), e.g.:
$ ls -l /usr/lib/python3/dist-packages/sling
lrwxrwxrwx 1 root root 28 May 7 15:51 /usr/lib/python3/dist-packages/sling -> /home/$USER/sling/python
The python
subdirectory then contains a symbolic link to pysling.so
:
$ ls -l /home/$USER/sling/python/
lrwxrwxrwx 1 michael staff 35 Jan 4 2018 pysling.so -> ../bazel-bin/sling/pyapi/pysling.so
Can I get you to check that this chain of symbolic links are properly installed on your machine?
PS: I will get the python->python3 bug fixed in the training script.
Thanks for the fast reply! I investigated sling/python/pysling.so
more and this led me to the problem:
The setup.sh
script was actually not the problem. I noticed that when transferring the sling
folder via FTP to the remote machine, sling/python/pysling.so
could not be transferred for some reason. When cloning the repository from GitHub to the remote machine directly, it worked.
Sounds good. As mentioned, the repo has a few symbolic links, and these can probably not be copied using FTP.
System
python --version
:Python 2.7.12
python3 --version
:Python 3.5.2
I have cloned the sling repository (master branch), run the
setup.sh
script (which was successful) and then started apython3
session. When I typeimport sling
it throws the following error:The same error occurs when I run the training script (
sling/nlp/parser/tools/train.sh
), which I have modified to usepython3
instead ofpython
(just replace the Python command in the second to last line):What am I doing wrong?