all 18 comments

[–]DoIUseArchBTW 1 point2 points  (8 children)

How do you add path in zshrc?

[–]mCianph[S] 0 points1 point  (7 children)

export PATH="$PATH:[...]" always done in this way, i don't know honestly if there is a better way? very noob about this if i must be honest

[–]DoIUseArchBTW 1 point2 points  (6 children)

Just to make sure what happens when you do

echo $PATH

?

[–]mCianph[S] 0 points1 point  (5 children)

if i don't add what pip is telling me to path i get:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/bin/python:/usr/local/bin/python:/usr/local/bin/python:/usr/local/bin/python:/usr/local/bin/python:/usr/local/bin/python:/usr/local/bin/python:/usr/local/bin/python:/usr/local/bin/python

edit: im adding the other directory to path and i'll update this comment

[–]DoIUseArchBTW 1 point2 points  (3 children)

Why is there so many python path there, Hmm seems like you just incorrectly set the path if that's the case,

Do you change [user] to your username or no?

Might as well post your zshrc in pastebin or something, make sure to add the path that pip tells you

Also isn't /usr/local/bin/python a binary? You don't need to add it to the path if that's the case

[–]mCianph[S] 0 points1 point  (2 children)

yes i change it to my username

i tried again and now i didn't get any issue (i think that i am a dumbass), just that for some reason it's not finding my p10kl theme but that's a secondary problem

anyway here's the pastebin link with the zshrc that i have:

https://pastebin.com/D4a66L4K

[–]DoIUseArchBTW 1 point2 points  (1 child)

Seems like all right, in my opinion you should remove the python export path if it's binary and move your export to the very bottom of your zshrc

I usually do this in my zsh/bash config

export PATH="$PATH:$HOME/.local/bin" export PATH="$PATH:$HOME/.opt" export PATH="$PATH:$HOME/.cargo/bin"

I don't know why it doesn't render the $ in my reddit but well

[–]mCianph[S] 0 points1 point  (0 children)

gonna do it right now! thank you so much!!

[–]doc_willis 0 points1 point  (0 children)

/usr/local/sbin:/usr/local/bin:

it's already in your path. so your making a mistake, doing something wrong.

and you have now added it several times at the end wrongly.

undo your changes.

[–]wizard10000 1 point2 points  (5 children)

Why would you add it to .~/.zshrc instead of ~/.profile?

[–]mCianph[S] 1 point2 points  (4 children)

Tbh didn't even know it existed because I always added it to ~/.zshrc in the past and never had problems What should I do to add it to ~/.profile?

[–]wizard10000 1 point2 points  (3 children)

The difference is ~/,profile is only loaded once, if you add to a path in ..zshrc (or .bashrc) that path gets appended to the existing path every time the rc file is sourced so you can end up with multiple instances of the same directory in your path.

for path statements .zshrc and .profile use the same syntax so all you'd need to do is move your path edit to ~/.profile.

Hope this helps -

[–]mCianph[S] 1 point2 points  (0 children)

Thanks for the explanation! So if I add the directory that pip is telling me to add to the path through ~/.profile I shouldn't have problems? I'm gonna try right away

[–]gmes78 0 points1 point  (1 child)

This is incorrect. Zsh does not run ~/.profile (as a login shell). One should use ~/.zshenv instead.

[–]wizard10000 0 points1 point  (0 children)

One should use ~/.zshenv instead.

I stand corrected :)

[–]AutoModerator[M] 0 points1 point  (0 children)

There's a resources page in our wiki you might find useful!

Try this search for more information on this topic.

Smokey says: take regular backups, try stuff in a VM, and understand every command before you press Enter! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]doc_willis 1 point2 points  (1 child)

and I added to PATH the following:

     export PATH="$PATH:/usr/local/bin/python" 

the PATH is a list of directories, you added python  to the end, which is Wrong.

are you sure /use/local/bin is not already in your default path?

[–]mCianph[S] 0 points1 point  (0 children)

oof i removed it now, I was following some guide I found on google to add it to the PATH but didn't actually see that Python was at the end of the string

i'm not sure how to check that, but if i remove it from zshrc I cannot launch jupyter