Virtualenv and Anaconda issues
anaconda, python, virtualenv
Solution
The virtualenv package does not work with Anaconda. From the terminal prompt you should create a new virtual environment using the conda statement `conda -n new_env_name`, as is explained in the docs.
Problem
So this issue has been brought up before, but I have not found a proper solution to this. I'm on a mac. When I run python in terminal I get: ``` Python 2.7.6 |Anaconda 1.9.2 (x86_64)| (default, Jan 10 2014, 11:23:15) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin ``` I don't really understand what that means, is it running Python 2.7.6 with Anaconda? Anyways, my problem is that I can't setup a virtualenv. When I try to create a virtual environment I get this error message: ``` New python executable in virtualenvs/bin/python Installing setuptools, pip... Complete output from command /Users/arashsaidi/virtualenvs/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip: Ignoring indexes: https://pypi.python.org/simple/ Exception: Traceback (most recent call last): File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/commands/install.py", line 236, in run session = self._build_session(options) File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/basecommand.py", line 52, in _build_session session = PipSession() File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/download.py", line 216, in __init__ super(PipSession, self).__init__(*args, **kwargs) File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 273, in __init__ self.headers = default_headers() File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/requests/utils.py", line 555, in default_headers 'User-Agent': default_user_agent(), File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/requests/utils.py", line 524, in default_user_agent _implementation = platform.python_implementation() File "/Users/arashsaidi/anaconda/lib/python2.7/platform.py", line 1499, in python_implementation return _sys_version()[0] File "/Users/arashsaidi/anaconda/lib/python2.7/platform.py", line 1464, in _sys_version repr(sys_version)) ValueError: failed to parse CPython sys.version: '2.7.5 (default, Aug 25 2013, 00:04:04) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]' Storing debug log for failure in /var/folders/jg/hs6w4q8x10n4ycwwf06dnp440000gn/T/tmpmM9rRS ---------------------------------------- ...Installing setuptools, pip...done. Traceback (most recent call last): File "/Users/arashsaidi/anaconda/bin/virtualenv", line 11, in <module> sys.exit(main()) File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv.py", line 824, in main symlink=options.symlink) File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv.py", line 992, in create_environment install_wheel(to_install, py_executable, search_dirs) File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv.py", line 960, in install_wheel 'PIP_NO_INDEX': '1' File "/Users/arashsaidi/anaconda/lib/python2.7/site-packages/virtualenv.py", line 902, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /Users/arashsaidi/virtualenvs/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 2 ``` Could you help me find a solution?