I want to run a Django application in PyCharm which works on MySQL DB.
我无法把我的方案与数据库联系起来。
当我试图安装MySQLclient或MySQL-python时,我正在犯错误:
MySQLclient的车道
请帮助我把我的Django方案与MySQL数据库联系起来。
I want to run a Django application in PyCharm which works on MySQL DB.
我无法把我的方案与数据库联系起来。
当我试图安装MySQLclient或MySQL-python时,我正在犯错误:
MySQLclient的车道
请帮助我把我的Django方案与MySQL数据库联系起来。
请尝试从。 每次都这样做。 Just category pip装置 MySQL_python‐1.2.5‐cp27‐none‐win32.whl
in the码头。
我也有同样的问题。 你可能认为这些步骤是有益的。
pip list
in the terminal to see what you have installed in the virtualenv. It should have wheel, setuptools and pip.pip install mysqlclient==1.3.9
or whatever version you want to install. This needs to happen before you install django.If these steps didn t work out for you, try installing MySQL-Python through the executable file here https://pypi.python.org/pypi/MySQL-python/1.2.5.
但是,这只会为系统中的各位安装我的头巾。 您可在虚拟台外尝试<代码>pip List,看看是否安装了我sql-python。 如果安装了这个员额,那么你就更新了这个员额,以便我们能够找到解决办法。
In the meantime some other fixes are:
I had the same problem. I then uninstalled my python. Downloaded the python 3.6.5. then used a command from
https://stackoverflow.com/q/51117503/5719810> 3.7. MySql-Python()的Failed Building wheel
指挥系统为pip安装了我sqlclient==1.3.12
。
In case you are using sqlalchemy
(which implicitly uses mysql-python
) to connect to a MySQL database, updating it using pip install sqlalchemy --upgrade
might do the trick and while creating a connection using an engine the syntax should be:
from sqlalchemy import create_engine
HOST = "your_host_name.host.com"
USER = "your_username"
PASSCODE = "your_passcode"
DATABASE = "name_of_database"
engine = create_engine(f mysql+mysqldb://{USER}:{PASSCODE}@{HOST}/{DATABASE} )
我找到了在Windows 10 64 bit、Django 版本3.10.0上安装神秘器的解决办法。
Download preferred mysqlclient wheel for your OS/bit size. here : https://pypi.tuna.tsinghua.edu.cn/simple/mysqlclient/
Point to the directory such as C:UsershpDesktopstorefrontstore
from your prompt or terminal
用pip i.e安装:C:UsershpDesktopstorefrontstore > pip安装了我的sqlclient-2.1.0-cp310-cp310-win_amd64.whl
我希望这一帮助。
www.un.org/Depts/DGACM/index_french.htm 我也有同样的问题,并尝试使用<代码>pip从CLI窗口进行指挥。 虽然我的<代码>pip的安装是成功的,但我未能从Pycharm上添加
I used Pycharm Terminal for Below packages and was able to connect to MySQL database.
例:
(PTPT) C:WindowsSystem32>pip3 install mysql-connector-python==8.0.29
Collecting mysql-connector-python==8.0.29
Downloading https://files.pythonhosted.org/packages/32/cd/1581bfe8f5ad7fd2aecdc499f0387227ad7912419384f9393b6205a764da/mysql_connector_python-8.0.29-py2.py3-none-any.whl (342kB)
|████████████████████████████████| 348kB 409kB/s
Requirement already satisfied: protobuf>=3.0.0 in c:usersmaghyptptlibsite-packages (from mysql-connector-python==8.0.29) (3.20.1)
Installing collected packages: mysql-connector-python
Found existing installation: mysql-connector-python 8.0.30
Uninstalling mysql-connector-python-8.0.30:
Successfully uninstalled mysql-connector-python-8.0.30
Successfully installed mysql-connector-python-8.0.29
WARNING: You are using pip version 19.3.1; however, version 22.2.2 is available.
You should consider upgrading via the python -m pip install --upgrade pip command.
pip install C:UsersUSER_NAMEDownloadsmysqlclient-1.4.6-cp37-cp37m-win32.whl
https://i.stack.imgur.com/zaGqU.png”rel=“nofollow noreferer”> PYCHARM MYSQL PACKAGE
I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...
<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...
我把我的用心从使用QQL转向MySQL。 它与凯科特合作,现在不工作,因为我已经改变,使用MySQL。 这里的错误信息是:
We have a restaurant table that has lat-long data for each row. We need to write a query that performs a search to find all restaurants within the provided radius e.g. 1 mile, 5 miles etc. We have ...
Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...
Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...
What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...
My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...