ImportError: Couldn't import Django

前端 未结 22 1932
无人共我
无人共我 2020-12-05 01:59

I\'ve already configured virtualenv in pycharm, when using the python manage.py command, this is error shown:

E:\\video course\\Python\\code\\web_worker\\MxO         


        
22条回答
  •  死守一世寂寞
    2020-12-05 02:39

    I was having great difficulties with this but I have solved my issue. I am on Windows 10 using Vagrant ssh in my virtualenv environment, the box I have installed is ubuntu/xenial64, Django version 2.1, python==3.6.

    When I was installing packages I was using pip3 but most importantly I was using sudo and the -H flag to install these packages. When I ran sudo pip3 freeze my packages would come up, but when I ran a plain pip3 freeze there would be no packages.

    Then I tried the python3 manage.py startapp and it did not work same error as you.

    I finally thought to try sudo python3 manage.py startapp it finally worked!

    Hope this was help :)

提交回复
热议问题