错误:virtualenvwrapper无法创建临时文件名

时间:2015-07-31 05:08:20

标签: python macos homebrew virtualenvwrapper

我按以下方式安装了virtualenvwrapper:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

$ brew install python
$ brew install pip
$ pip install virtualenvwrapper

$  nano ~/.bashrc 
# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc

执行source .bashrc

后出现以下错误
touch: : No such file or directory
ERROR: virtualenvwrapper could not create a temporary file name.
touch: : No such file or directory
ERROR: virtualenvwrapper could not create a temporary file name.

如何解决问题?

1 个答案:

答案 0 :(得分:1)

这是解决方案:

# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH

export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv

export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

# Load .bashrc if it exists
#test -f ~/.bashrc && source ~/.bashrc