ModuleNotFoundError: No module named 'django' problem in vs code

前端 未结 1 388
青春惊慌失措
青春惊慌失措 2020-12-22 12:45

I have installed virtual environment via pip install pipenv for my django project in vs code. Although I had successfully installed virtual environment and django(3.0.5) , b

相关标签:
1条回答
  • 2020-12-22 12:53

    Try this

    the issue is that the place where you trying to create virtual environment doesn't contain manage.py file means your manage.py is not present in your project folder thats why you getting this error. Fix below

    always use this pattern when creating a project and running virtual envionment

    1.) locate to the directory, lets say you are here C:\desktop\projects

    2.) now use below commands

    pipenv install django==3.0.1
    

    then start the virtual enviorment

    pipenv shell
    

    create project

    django-admin startproject newproject . (don't avoid this period)

    run server

    python manage.py runserver
    
    0 讨论(0)
提交回复
热议问题