ImportError: No module named 'veles' on macOS
Latest veles for macOS (it reports itself as 2018.05.0.TIF in it's about dialogue) fails to launch properly on my system. The installed app bundle starts, but fails to do anything useful after showing the following error message:
Trying to start a new server...
working directory: /Applications/veles.app/Contents/Resources/veles-server
python script name: srv.py
python interpreter executable: /Applications/veles.app/Contents/MacOS/../Resources/veles-server/venv/bin/python3
arguments:
srv.py
--cert-dir
/Users/jdoe/Library/Application Support/CodiSec/Veles
veles+ssl://[email protected]:3135
/Users/jdoe/Library/Application Support/CodiSec/Veles/veles.vdb
Waiting for a new server to start...
Process of locally created server started.
Traceback (most recent call last):
File "srv.py", line 22, in <module>
from veles.server.conn import AsyncLocalConnection
ImportError: No module named 'veles'
Process of locally created server finished. Exit code: 1.
NetworkClient: Disconnect.
This is macOS Sierra 10.12.6, uname is Darwin [redacted] 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 21 20:07:39 PDT 2018; root:xnu-3789.73.14~1/RELEASE_X86_64 x86_64.
https://github.com/codilime/veles/issues/318
I installed the python 3.6 according to these instructions for brew https://stackoverflow.com/a/51727268
This sounds like a packaging issue, and not a project problem.
Please ask the package maintainer to fix this.
Packaging issue. Simplest fix to get it working for me, since it points to a local python environment and fails to load 'veles' package is to;
cd /Applications/veles.app/Contents/Resources/veles-server/venv/bin
mv python3 backup_python3
ln -s `which python3` .
This should create a symbolic link to where your real python3 environment is. If it still fails to load the package just install it from this git repo.
yep though veles virtualenv was created for 3.6, >3.6 won't do. to get old py3.6 on macos:
brew install pyenv && pyenv install 3.6.5
ln -sf ~/.pyenv/versions/3.6.5/bin/python3.6 /Applications/veles.app/Contents/Resources/veles-server/venv/bin/python3