I added $PYTHONPATH
permanently via .bashrc
like this
export PYTHONPATH=$PYTHONPATH:/path/to/python-sdk
and now when I start python, it doesn't show up in sys.path` and the libraries can't be imported. I know I could add it in python like this, but I want it to be permanently added.
I am using Linux Mint 19.2, kernel Linux 4.15.0-54-generic and Python 2.7.15+.
Edit: Unfortunately the other topic does not help me, because, even though i am using $PYTHONPATH
, i cannot import the packages lying in the defined path. I want to permanently add this path and normally it works like this, but $PYTHONPATH
doesn't seem to work at all.
Edit 2:
This is the command line, when I try to use $PYTHONPATH
:
$ export export PYTHONPATH=$PYTHONPATH:/opt/nao/python-sdk/lib/python2.7/site-packages
$ python
Python 2.7.15+ (default, Oct 7 2019, 17:39:04)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import naoqi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named naoqi
$ sudo ls /opt/nao/python-sdk/lib/python2.7/site-packages/
allog.py almathswig.py inaoqi.pyc naoqi.py README
allog.pyc _almathswig.so _inaoqi.so naoqi.pyc vision_definitions.py
_allog.so expressiveness.py motion.py qi
almath.py inaoqi.py motion.pyc _qi.so