I recently renamed my Django project in Pycharm and now I have many errors associated with Python. From my MAC terminal when I try and run:
$ django-admin startproject mobileproject
or
$ pip install django
I get:
-bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory
In Pycharm when I open most of my Django projects I now get:
invalid python interpreter selected for the project
or when i try to install pip:
$ sudo easy_install pip
i get:
sudo: unable to execute /usr/local/bin/easy_install: No such file or directory
Below was the original structure of my project:
---project
---project
---app
---models.py
...etc
---project
---settings.py
...etc
---manage.py
---venv
To rename my Django project in Pycharm I right clicked on the root folder "project" and selected refactor/rename/rename project. For the rest of the folders I right clicked and selected refactor/rename and I was only given rename directory so I chose that. Below shows how I renamed my project folders.
---newproject
---newp
---newapp
---models.py
...etc
---newp
---settings.py
...etc
---manage.py
---venv
After doing this I have all the errors listed above. I think choosing "rename project" instead of "rename directory" messed things up. But why do I have problems outside of Pycharm when trying to start a new project with django-admin startproject or tell pip to install django? I feel like the Python executable is in the wrong directory but I have no idea. Please Help!
pyenv
so I don't depend on the OS version. – Melvyn