PYTHONPATH in .bashrc? .profile? Errors when upgrading from Ubuntu 16 to 18












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?










share|improve this question























  • 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


















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?










share|improve this question























  • 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
















0












0








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?










share|improve this question














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?







python3 bashrc anaconda






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 12 at 16:27









Luis MiguelLuis Miguel

1086




1086













  • 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





















  • 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



















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





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





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





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





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







you can see it with man python

– abu-ahmed al-khatiri
Jan 12 at 16:52












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109164%2fpythonpath-in-bashrc-profile-errors-when-upgrading-from-ubuntu-16-to-18%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109164%2fpythonpath-in-bashrc-profile-errors-when-upgrading-from-ubuntu-16-to-18%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局