New to PyCharm and Django, I've looked through online for this solution for a few hours already, nothing seems to work.
The usual: python -m django-admin startproject mysite
does not seem to work if my cmd directory is at C:\Users\...\PycharmProjects\
On the other hand, if I use cd C:\Users\...\AppData\Local\Programs\Python\Python38\Scripts
before reentering the former code, I get the exact results that I want.
Any idea how to fix this?
Edit:
Okay, so I figured a solution. If I were to copy "django-admin.exe" into C:\Users\...\PycharmProjects\
, django-admin startproject mysite
will work as intended.
The real issue I have is the command python -m
itself. Nothing that follows after that line seems to work with it. I've revised my advanced environment pathing, but so far I haven't had much luck.
Edit 2:
Typing python
takes me to Windows Store, but py
will work as intended. Subsequently, problems like py -m django --version
will work as intended if I type them in cmd. However, the problem persist if I try to do it in my PyCharm virtual environment.
I've tested and changed multiple directories for both cmd and PyCharm's virtual environment, the solution works consistently in cmd, but not in Pycharm. Any explanations for this?