4 ms·
Surely you could just install Python3 and pip systemwide, then ask virtualenv/virtualenvwrapper to use that one? virtualenv -p $(which python3) ENV
by jeffbr13 13y ago
Surely you could just install Python3 and pip systemwide, then ask virtualenv/virtualenvwrapper to use that one?
virtualenv -p $(which python3) ENV # with virtualenv
mkvirtualenv [-a project path] -p $(which python3) ENVNAME # with virtualenvwrapper
- raverbashing 13y agoDid you actually try that? No, it doesn't work Python 3 comes with pyvenv that's the one that should be used
- pdw 13y agoHow does it break? I've always used virtualenv -p /path/to/python3 and it seems to work fine.
- raverbashing 13y agoJust tried this with virtualenv and pyvenv-3.4 and they don't produce identical results. The good thing about 3.4 is that they finally give a good virtualenv by default and we don't need to install setuptools/pip inside manually
- bitcrusher 13y agoDid you? That works perfectly if you already have python3 installed.
- rspeer 13y agopyvenv in Python 3.3 was immensely frustrating to use, because it leaves you without any package manager that understands your virtualenv. I've seen this rumor that virtualenv "doesn't work" in Python 3. It seems to be propagated by people who make Python 2 virtualenvs and get confused, including a StackOverflow thread full of people basically typing commands at random to try to fix the problem. But pyvenv in 3.3 had much more potential for confusion. The fact that Python 3.4 bundles pip may finally resolve this confusion, and make pyvenv appropriate to use. But I'm sure virtualenv will keep working fine as well as long as you don't mix up major versions of Python.
- raverbashing 13y agoExactly Yes, the regular virtualenv may work with Python 3 but it's a small detail in a frustrating setup. When I finally found out how you're supposed to do in > 3.4 it was a relief, still Just tested 3.4 as it is like in 2.X, so, problem solved and no-one has to worry about this anymore.