Permanently add a directory to PYTHONPATH?

前端 未结 19 1302
别那么骄傲
别那么骄傲 2020-11-22 01:12

Whenever I use sys.path.append, the new directory will be added. However, once I close python, the list will revert to the previous (default?) values. How do I

19条回答
  •  甜味超标
    2020-11-22 01:41

    Fix Python Path issues when you switch from bash to zsh

    I ran into Python Path problems when I switched to zsh from bash.

    The solution was simple, but I failed to notice.

    Pip was showing me, that the scripts blah blah or package blah blah is installed in ~/.local/bin which is not in path.

    After reading some solutions to this question, I opened my .zshrc to find that the solution already existed.

    I had to simply uncomment a line:

    Take a look

    Screenshot from 2020-10-07 13-38-17

提交回复
热议问题