【发布时间】:2014-06-19 13:52:59
【问题描述】:
以下在 bash 中有效:
~$ echo $PYTHONPATH
<nothing>
~$ export PYTHONPATH=/path/to/test/folder
~$ echo $PYTHONPATH
/path/to/test/folder
~$ python -m test_script
hello world
但不是鱼:
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
~> echo $PYTHONPATH
<nothing>
~> set --universal PYTHONPATH /path/to/test/folder
~> echo $PYTHONPATH
/path/to/test/folder
~> python -m test_script
/usr/bin/python: No module named test_script
我试过set、set --global 和set --universal。
如何在 fish 中设置 PYTHONPATH? (如果重要的话,我正在运行 Ubuntu 14.04。)
【问题讨论】: