Issue
SkyNet is publicly available as an open-source software at https://bitbucket.org/jlippuner/skynet. I am having problems installing this software. I am using Ubuntu, and I have downloaded all needed packages using apt. All tests pass (not at first, but after restarting), but the problems start when I try to run the example code.
As instructed at the bitbucket page, I have used CMake to try to install the package, and all files seem to be installed, and the tests work.
The first line in the code is from SkyNet import *
, but this just returns No module named 'Skynet' found
. I have tried to reinstall and using different versions of Python, but it doesn't seem to work. Can anyone help me?
Solution
Going through the Skynet documentation install page I found this,
For python to find the Skynet module the directory in which it exists has to be added to PYTHONPATH
environment variable.
Replace install_dir
with directory where the Skynet module has been installed to.
echo "export PYTHONPATH=<install_dir>/lib:\$PYTHONPATH" >> ~/.bashrc
An alternative approach would be to add the path where Skynet module exists to sys.path
at the top of your script file.
Example
import sys
sys.path.append("/usr/lib/Skynet")
from Skynet import *
Here is a link to documentation on how python resolves module imports
Answered By - Mishal Ismeth Answer Checked By - Cary Denson (WPSolving Admin)