18đź‘Ť
I’d recommend that you read up the basics of virtualenv
(http://docs.python-guide.org/en/latest/dev/virtualenvs/) and continue from there.
Basically following commands should get you running:
$ cd ~/your_project_directory
$ virtualenv env
$ source env/bin/activate
$ pip install django
$ pip install mysql-python
Make sure you have MySQL (server) installed on your system. If you’re on Mac OS X, brew
(http://brew.sh/) is quite handy.
30đź‘Ť
You don’t download the whl file yourself. You use pip to install it directly:
pip install mysqlclient.
Note that you don’t need this to try Django; nor do you need Apache. Python and Django is already an “integrated development environment” since Python includes sqlite3, and Django includes a development server.
- How can I use AWS's Dynamo Db with Django?
- Pycharm Django Debugging is really slow
- Fix Conflicting migrations detected in Django1.9
10đź‘Ť
Here is my solution. Make sure your virtualenv is activated, then type the following:
apt-get install default-libmysqlclient-dev
pip install mysqlclient
5đź‘Ť
You don’t have to download any whl file
pip install mysqlclient
will work just fine .
In case you get any Microsoft Visual C++ error try
pip install --only-binary :all: mysqlclient
hope it helps .
- Pylint (pylint_django) does not work when –django-settings-module flag is specified
- Why does python new york time zone display 4:56 instead 4:00?
- Django annotating with a first element of a related queryset
- Django 1.6: How to access static files in view
- Pycharm (Python IDE) doesn't auto complete Django modules
1đź‘Ť
brew install mysql-connector-c
brew install mysql
brew unlink mysql-connector-c
sudo pip install pymysql
sudo pip install mysqlclient
Try running these commands on the terminal to install mysqlclient
- Python Social Auth Django template example
- How to avoid creating test database for testing in django?
- Django annotating with a first element of a related queryset
0đź‘Ť
You might got the wrong bit version of Python. Check that your bit version of python is correct. I by misstake downloaded the 32-bit version of Python and I got the same issue as you. I could do pip install mysqlclient
with the 64-bit version without any issues.
(note that the windowsx86 on the image is 32-bit)
0đź‘Ť
I solved through these steps:
pip install –upgrade pip
pip install –upgrade setuptools
pip install mysqlclient==1.4.6
if mysqlclient==1.4.6 will not work then try some other versions
pip install mysqlclient==x.x.x
- How can my Model primary key start with a specific number?
- How does Waitress handle concurrent tasks?
- How to access RequestContext in class-based generic views?