pip install Django on python3.6

后端 未结 5 2389
青春惊慌失措
青春惊慌失措 2021-02-19 19:35

If I run pip install Django I get

Requirement already satisfied: Django in /usr/local/lib/python2.7/dist-packages

I\'

5条回答
  •  不知归路
    2021-02-19 20:00

    You can install it globally as others suggested, but the recommended way to install it is to use virtualenv or venv. In case you are using virtualenv (with virtualenvwrapper), just do

    mkvirtualenv --python="path to python3 executable" "environment name"
    pip install django
    

    Inside virtual environment pip would be pip3 by default and so is python.

提交回复
热议问题