0

I upgraded my Ubuntu to 18.10 from 1, and now I am having problems with some of my settings. I used Anaconda python, and when trying to load one of my custom libraries, I get this:

---> 13 from meta_utilities import feature_processing as fp

ModuleNotFoundError: No module named 'meta_utilities'

I run this:

import sys
print(sys.path)

which returns this:

['', '/home/luis/Documents/kaggle', '/home/luis/anaconda3/lib/python37.zip', '/home/luis/anaconda3/lib/python3.7', '/home/luis/anaconda3/lib/python3.7/lib-dynload', '/home/luis/anaconda3/lib/python3.7/site-packages', '/home/luis/anaconda3/lib/python3.7/site-packages/IPython/extensions', '/home/luis/.ipython']

However, when I do echo $PYTHONPATH, it returns empty

The repo where I have my python development files is

/home/luis/Documents/

I have added several variations of this to .profile, bash.bashrc, .bashrc and after sourcing, I can't get to set my pythopath..

export PYTHONPATH="${PYTHONPATH}:/home/luis/Documents/"
export PYTHONPATH=/home/luis/Documents/
export PYTHONPATH="/home/luis/Documents/:$PYTHONPATH"

No idea why none of these variations work. Is there a "hidden" bashrc used by Anaconda that overrides settings? Why echo $PYTHONPATH reports empty and sys reports something? Where is the bashrc file that sys is reading to report what it reports?

  • try to add it on /etc/environment with including VAR=/path/to/bin/of/python3:/path/to/lib/of/python3:/path/to/include/of/python3 and to echo again – abu-ahmed al-khatiri Jan 12 at 16:36
  • That sounds impractical: I have hundreds of python libraries installed to go over one by one – Luis Miguel Jan 12 at 16:41
  • you try to add it with $HOME directory even though $PYTHONHOME have secure_path included on $PATH variable. i'm not sure if it work. try to copy your libraries on $PATH defined. – abu-ahmed al-khatiri Jan 12 at 16:50
  • What is $PYTHONHOME????? – Luis Miguel Jan 12 at 16:52
  • you can see it with man python – abu-ahmed al-khatiri Jan 12 at 16:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.