我正在使用terminal
外壳的-bash
ps -p$$ -ocommand= ---> -bash
echo $ PATH返回:
-bash: /usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/alex_fimm_dev/Desktop/Databases/Mongo/mongodb/bin:/Users/alex_fimm_dev/Desktop/Databases/Mongo/mongodb/bin:/usr/local/Cellar/android-sdk/24.4.1_1/tools:/usr/local/Cellar/android-sdk/24.4.1_1/platform-tools
echo $ PYTHONPATH ----->不返回任何内容
需要将$ PYTHONPATH设置为/ directory / of / choice
我尝试失败,
export PYTHONPATH=$PATH:/directory/of/choice
还写信给:nano .bash_profile:
export PYTHONPATH=$(/directory/of/choice)
我还关闭了它们之间的终端以检查更改。
答案 0 :(得分:0)
以下所有文件的导出路径:
private/etc/profile
喜欢:
export PYTHONPATH="/directory/of/choice"
帮了我大忙。如以下所述: