2014-10-24 2 views
4

저는 우분투 (14.04)를 처음 사용합니다. 방금 sudo pip install Django을 사용하여 장고를 설치했습니다.Python3.4에서 Django를 가져올 수 없습니다.

이 일어나고있는 것입니다 :

[email protected]:~$ 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 
>>> 

[email protected]:~$ 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' 
>>> 

내가 Python3.4에서 장고를 사용할 수 있도록 어떻게해야합니까?

+0

http://askubuntu.com/questions/401132/how-can-i-install-django-for- python-3-x – blfuentes

답변

10

그냥 쓰기 : 다니엘이 말한 것처럼

sudo pip3 install Django 

그러나 더 나은 VIRTUALENV 사용합니다.

Reference

당신이 pip3를 실행할 수없는 경우 following로 설치한다 :

sudo apt-get install python3-setuptools 
sudo easy_install3 pip 
1

pip는 아마도 Python 3이 아닌 Python 2 용으로 설치되었을 것입니다. Py3을 대상으로하는 pip3 버전이있을 수 있습니다.

그러나 virtualenv를 사용하는 것이 좋습니다.

+0

$ sudo pip3 install Django sudo : pip3 : 명령을 찾을 수 없습니다. – rohithpr

+0

내 솔루션을 확인하십시오. 그것은 pip3를 설치하는 방법을 설명합니다 – blfuentes

관련 문제