我在Mac上,当我打开我的shell时,它会显示以下内容:
-bash: export: `/Users/jasoncollis/torch/install/bin/torch-activate:/usr/local/bin:/Users/jasoncollis/Library/Enthought/Canopy_64bit/User/bin:/Users/jasoncollis/anaconda/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin': not a valid identifier
这是我的#.bash_profile#文件:
# Setting PATH for Python 3.5
# The original version is saved in .bash_profile.pysave
PATH=":/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH
# added by Anaconda3 4.2.0 installer
export PATH=":/Users/jasoncollis/anaconda/bin:$PATH"
# Added by Canopy installer on 2016-11-10
# VIRTUAL_ENV_DISABLE_PROMPT can be set to '' to make the bash prompt show that Canopy is active, otherwise 1
alias activate_canopy="source '/Users/jasoncollis/Library/Enthought/Canopy_64bit/User/bin/activate'"
VIRTUAL_ENV_DISABLE_PROMPT=1 source '/Users/jasoncollis/Library/Enthought/Canopy_64bit/User/bin/activate'
export PATH=":/usr/local/bin:$PATH"
export LC_CTYPE=en_US.UTF-8
export PATH=":/Users/jasoncollis/torch/install/bin/torch-activate:$PATH"
export PATH=":/Users/jasoncollis/torch/install/bin:$PATH"
我一直在努力寻找解决方案,但到目前为止,我所尝试过的一切都没有。真的很感激任何帮助!
答案 0 :(得分:0)
确保编辑正确的文件。对于登录shell,Bash执行.bash_profile
而不是#.bash_profile#
。后者看起来像是由文本编辑器或脚本创建的备份文件。