PYTHONPATH in .bashrc? .profile? Errors when upgrading from Ubuntu 16 to 18
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
|
show 3 more comments
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
try to add it on/etc/environment
with includingVAR=/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 withman python
– abu-ahmed al-khatiri
Jan 12 at 16:52
|
show 3 more comments
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
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
python3 bashrc anaconda
asked Jan 12 at 16:27
Luis MiguelLuis Miguel
1086
1086
try to add it on/etc/environment
with includingVAR=/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 withman python
– abu-ahmed al-khatiri
Jan 12 at 16:52
|
show 3 more comments
try to add it on/etc/environment
with includingVAR=/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 withman 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
|
show 3 more comments
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
try to add it on
/etc/environment
with includingVAR=/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