Where is Pip3 Installing Modules?

后端 未结 2 889
无人共我
无人共我 2021-02-05 17:29
  • Ubuntu 15.10
  • Python 3.4.3+
  • Django 1.8.7

When I try to import django in the python3 interpreter, it says ImportError: No

相关标签:
2条回答
  • 2021-02-05 17:52

    I think you have installed django outside virtual environment. download virtual environment by

    pip install virtualenv
    virtualenv your_env
    

    Activate virtual environment.

    source your_env/bin/activate
    

    Then, Install django in your virtual environment.

    0 讨论(0)
  • 2021-02-05 17:54

    Normally pip 3 install on python3 dist-packages

    You can always use pip with:

    python3 -m pip install package
    

    to check if you are experiencing troubles with another python3 installation

    ls /usr/local/lib | grep python
    

    But the easy way to not experiment this headache is by using virtual environments

    0 讨论(0)
提交回复
热议问题