如何设置我的新Python 3.5安装的默认路径?

时间:2015-10-28 03:26:33

标签: python python-3.5

我刚从官方python网站安装了python 3.5。它安装在我的计算机上,并在我的计算机上安装:

/Library/Frameworks/Python.framework/Versions/3.5

但是,我正在尝试运行virtualenv,当我尝试创建一个新的虚拟环境时,它会转到此错误消息。

-bash: /Users/me/anaconda/bin/virtualenv: No such file or directory

我从计算机上删除了Anaconda,但即使安装了python 3.5路径,仍无法创建虚拟环境。

这是我的bash_profile。

# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"

# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH

# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH

# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH

##
# Your previous /Users/lewismenelaws/.bash_profile file was backed up as /Users/lewismenelaws/.bash_profile.macports-saved_2015-02-25_at_15:58:24
##

# MacPorts Installer addition on 2015-02-25_at_15:58:24: adding an appropriate PATH variable for use with MacPorts.

1 个答案:

答案 0 :(得分:1)

尝试添加

PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH

然而,我没有看到python 3.5的任何路径。

老实说,我会抓住所有这些并使用自制软件安装python,pip和virtualenv,所以一切都在/usr/local/bin/