Hi everyone, someone wrote in complaining that they couldn't make a Python3.3 virtualenv. Traceback looks like this:
$ mkvirtualenv -p python3.3 p3
Running virtualenv with interpreter /usr/local/bin/python3.3
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 2560, in <module>
main()
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 874, in main
default_search_dirs = file_search_dirs()
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 601, in file_search_dirs
import virtualenv
File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper
File "<frozen importlib._bootstrap>", line 1023, in load_module
File "<frozen importlib._bootstrap>", line 1004, in load_module
File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper
File "<frozen importlib._bootstrap>", line 854, in _load_module
File "<frozen importlib._bootstrap>", line 990, in get_code
File "<frozen importlib._bootstrap>", line 1051, in _cache_bytecode
File "<frozen importlib._bootstrap>", line 1065, in set_data
OSError: [Errno 30] Read-only file system: '/usr/local/lib/python2.7/site-packages/__pycache__'
We're not quite sure why it's happening yet, but there is a pleasingly recursive workaround: create a normal python2 virtualenv first, reinstall virtualenv into it, and then create your python3 virtualenv from inside it:
mkvirtualenv xzibit
pip install virtualenv
mkvirtualenv -p python3.3 my_python3_virtualenv