when running that command python manage.py runserver I get this error
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
I try to pip install mysqlclient and get this
Command "C:\Users\xavi6\PycharmProjects\LES\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\xavi6\\App
Data\\Local\\Temp\\pip-install-8q8y5ra6\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\
n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\xavi6\AppData\Local\Temp\pip-record-zvgp3gov\inst
all-record.txt --single-version-externally-managed --compile --install-headers C:\Users\xavi6\PycharmProjects\LES\venv\include\site\py
thon3.7\mysqlclient" failed with error code 1 in C:\Users\xavi6\AppData\Local\Temp\pip-install-8q8y5ra6\mysqlclient\
I'm using pycharm and I think I try everything. How can I resolve this error?
have you installed pip install mysqlclient
Then edit init.py
import pymysql
pymysql.install_as_MySQLdb()
and then let me know it worked or not.Happy coding
Related
When I try importing pyautogui it says module not found and on installing it in the command line:
command
pip3 install pyautogui
responce in terminal
Command "D:\pythonp\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-1zr0j9qn\\Pillow\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.re
ad().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\hp\AppData\Local\Temp\pip-record-gwxfcxoi\install-record.txt --single-version-externally-managed --compile --install-
headers D:\pythonp\venv\include\site\python3.8\Pillow" failed with error code 1 in C:\Users\hp\AppData\Local\Temp\pip-install-1zr0j9qn\Pillow\
After carefully looking at everything around my project I realized for the imports to work, the python file should be inside the venv folder.
I am unable to install psutil by requeriments.txt neither by logging in with heroku run bash command and using the pip install psutil command.
The log is very large, so, I will put the "most important" part of it:
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-759b4csi/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-addox7ji-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-759b4csi/psutil/
Can someone help me with this?
I am using python 3.6.0 and pip 9.0.1
I used pip freeze > requirements.txt to generate a new requirements and this new file was processed by the deploy tool correctly.
I wrote this command to install:
sudo pip install pymavlink
and got this error:
ImportError: No module named future
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-gsZblL/pymavlink/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ppCGHA-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-gsZblL/pymavlink
Storing debug log for failure in /root/.pip/pip.log
I have solved the problem installing this package:
$ sudo pip install dronekit
I'm tying to install tables as follows (I have no sudo permissions):
pip install --user tables
And I get the following error:
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-pWg1M_/tables/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-mOibUT-record/install-record.txt --single-version-externally-managed --compile --user failed with error code 1 in /tmp/pip-build-pWg1M_/tables Storing debug log for failure in /home/hudson/pg/fkgm22/.pip/pip.log
I can install other packages with this method, but not tables... any idea?
Thanks
You can check the log pip has mentioned at /home/hudson/pg/fkgm22/.pip/pip.log to see what went wrong. I guess you will get a much more detailed error message which you can try to analyse.
I have been having trouble installing gevent on Mac OS X Mavericks. I am trying to install into a virtual environment. First I installed libevent with brew. Then I ran:
pip install gevent
Unfortunately, I could not get it installed because I kept getting this error message:
Command /Users/christopherspears/.virtualenvs/traffic/bin/python -c "import setuptools, tokenize;__file__='/Users/christopherspears/.virtualenvs/traffic/build/greenlet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/yv/vnky4wpd7kl4bp4qb4hlqmhw0000gn/T/pip-91tw1E-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/christopherspears/.virtualenvs/traffic/include/site/python2.7 failed with error code 1 in /Users/christopherspears/.virtualenvs/traffic/build/greenlet
Storing debug log for failure in /Users/christopherspears/.pip/pip.log
The issue seems to be with greenlet. Has anyone else com across this error?