我正在尝试设置一个新的虚拟环境来使用django和flask。
已安装
sudo pip install virtualenv
sudo pip install virtualenvwrapper
然后在.profile
这三行中添加;
export WORKON_HOME=$HOME/Envs
export PROJECT_HOME=$HOME/dev
source /Users/someone/anaconda/bin/virtualenvwrapper.sh
当我尝试通过
创建一个新项目时$ mkproject helloFlask
错误:
someone$ mkproject helloFlask
New python executable in helloFlask/bin/python
Installing setuptools, pip...
Complete output from command /Users/someone/Envs/helloFlask/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/someone/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/__init__.py", line 6, in <module>
File "/Users/someone/anaconda/lib/python2.7/optparse.py", line 77, in <module>
import textwrap
File "/Users/someone/anaconda/lib/python2.7/textwrap.py", line 10, in <module>
import string, re
File "/Users/someone/anaconda/lib/python2.7/string.py", line 83, in <module>
import re as _re
File "/Users/someone/Envs/helloFlask/lib/python2.7/re.py", line 105, in <module>
import sre_compile
File "/Users/someone/Envs/helloFlask/lib/python2.7/sre_compile.py", line 14, in <module>
import sre_parse
File "/Users/someone/Envs/helloFlask/lib/python2.7/sre_parse.py", line 17, in <module>
from sre_constants import *
File "/Users/someone/Envs/helloFlask/lib/python2.7/sre_constants.py", line 18, in <module>
from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
我在这里缺少什么?