Failed to import Django in Python3.4

I am new to Ubuntu (04/14). I just installed django using sudo pip install Django.

This is what happens:

rpr@rpr-Inspiron-3521:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> 

rpr@rpr-Inspiron-3521:~$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'django'
>>> 

What should I do to use Django from Python3.4?

+4
source share
2 answers

Just write:

sudo pip3 install Django

But it is better to use virtualenv, as Daniel said.

Link

If you cannot start pip3, install it with the following :

sudo apt-get install python3-setuptools
sudo easy_install3 pip 
+10
source

pip is supposedly installed for Python 2, not Python 3. You may have a version with a name pip3that is designed for Py3.

However, it would be better to use virtualenv.

+1
source

All Articles