![]() Python now comes with its own implementation of virtual environment, by the name of "venv". Might be safe to just skip -system-site-packages flag for Django projects. Having said that experiment which option works better. Even python manage.py shell becomes very slow. I presume Django environment initialisation is manually scanning and appending all site packages from the system path which might be the reason. If there are a lot of system wide python packages then it is recommended to not use -system-site-packages flag especially during development since I have noticed that it slows down Django startup a lot. Mkvirtualenv -p $(which python3) -system-site-packages Using this technique saves a lot of time spent on fetching packages and installing them, apart from consuming minimal disk space and network bandwidth. When working on multiple python projects simultaneously it is usually recommended to install common packages like pdbpp globally and then reuse them in virtualenvs. Install other requirements using pip package manager. ![]() Optionally enable -system-site-packages flag. sudo apt-get install python3 python3-pip virtualenvwrapperĬreate a Python3 based virtual environment. ImportError: No module named '_collections_abc'ĮRROR: The executable test/bin/python3.4 is not functioningĮRROR: It thinks sys.prefix is '/Users/user/Documents/workspace/test' (should be '/Users/user/Documents/workspace/test/test')ĮRROR: virtualenv is not compatible with this system or executable New python executable in test/bin/python3.4Īlso creating executable in test/bin/pythonįile "/Users/user/Documents/workspace/test/test/bin/./lib/python3.4/site.py", line 67, in įile "/Users/user/Documents/workspace/test/test/bin/./lib/python3.4/os.py", line 634, in įrom _collections_abc import MutableMapping ![]() Using base prefix '/usr/local/Cellar/python3/3.4.0_1/Frameworks/amework/Versions/3.4' I get: Running virtualenv with interpreter /usr/local/bin/python3 Now, how do I create a virtualenv that uses the new version? I used brew install python3 to install it on my Mac. On one project, I need to use Python 3.4. Using virtualenv, I run my projects with the default version of Python (2.7). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |