Virtualenvwrapper安装雪豹python [英] Virtualenvwrapper installation snow leopard python

查看:181
本文介绍了Virtualenvwrapper安装雪豹python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用django1.4配置 virtualenvwrapper 。我正在追踪这个发布,并尝试做它所说的那样:

I am trying to configure virtualenvwrapper with django1.4. I am following this post and am trying to do what it says there:

Admin$ pip install virtualenvwrapper
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)

Admin$ export WORKON_HOME=$HOME/.virtualenvs
Admin$ export PROJECT_HOME=$HOME/Users/Admin
Admin$ source /usr/local/bin/virtualenvwrapper.sh
/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.

Admin$ mkvirtualenv --python=python2.7 mynewenv
The executable /Users/Admin/python2.7 (from --python=/Users/Admin/python2.7) does not exist

任何人都可以帮我弄清楚如何在我的osx雪豹安装中设置virtualenvwrapper?非常感谢您的帮助!

Can anyone help me figure out how to get virtualenvwrapper set up on my osx snow leopard installation? Thanks so much for the help!

推荐答案

看起来你正在尝试使用python2.7,但是你没有告诉virtualenvwrapper关于这一点。在$ code> source / usr / local之前,尝试添加 export VIRTUALENVWRAPPER_PYTHON = / usr / bin / python2.7 (假设您的python2.7安装位置) /bin/virtualenvwrapper.sh - ie

It looks like you're trying to use python2.7, but you haven't told virtualenvwrapper about that. Try adding export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7 (assuming that's where your python2.7 install is located) before source /usr/local/bin/virtualenvwrapper.sh - i.e.

Admin$ export WORKON_HOME=$HOME/.virtualenvs
Admin$ export PROJECT_HOME=$HOME/Users/Admin
Admin$ export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
Admin$ source /usr/local/bin/virtualenvwrapper.sh

这篇关于Virtualenvwrapper安装雪豹python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆