I am trying to pip install
the MySQL-python
package, but I get an ImportError
.
Jans-MacBook-Pro:~ jan$ /Library/Framew
I was getting the same error on Mac OS 10, Python 3.7.6 & Django 2.2.7. I want to use this opportunity to share what worked for me after trying out numerous solutions.
Steps
Installed Connector/Python 8.0.20 for Mac OS from link
Copy current dependencies into requirements.txt file, deactivated the current virtual env, and deleted it using;
create the file if not already created with; touch requirements.txt
copy dependency to file; python -m pip3 freeze > requirements.txt
deactivate and delete current virtual env; deactivate && rm -rf
Created another virtual env and activated it using; python -m venv
Install previous dependencies using; python -m pip3 install -r requirements.txt