Virtualenv with python3

Environment

RH-based linux with python2.6 and python 3.3 (default is: python 2.6)

Problem

[ec2-user@h1 django-test-project]$ virtualenv -ppython3 env
Running virtualenv with interpreter /usr/bin/python3
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 21, in
from distutils.util import strtobool
File "/usr/lib64/python3.3/distutils/util.py", line 9, in
import imp
File "/usr/lib64/python3.3/imp.py", line 20, in
from importlib._bootstrap import new_module
ImportError: No module named 'importlib._bootstrap'

Solution

sudo rpm –nodeps -e python-importlib

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>