In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Try to install through pip in a virtual environment:
Pip install mysqlclient
And then report an error: OSError: mysql_config not found
Find the official documentation https://github.com/PyMySQL/mysqlclient-python and explain that another module needs to be installed before installation:
Brew install mysql-connector-c
But report an error:
Check the error message before installing mysql-connector-c
Brew unlink mysql
However, if you continue with the installation, there is still an error:
Check the official instructions, it turns out that under macOS, you need to change the
# on macOS, on or about line 112 Create options libs= "- L$pkglibdir" libs= "$libs-l"
Change to
# Create options libs= "- L$pkglibdir" libs= "$libs-lmysqlclient-lssl-lcrypto"
It's easy to do next, directly.
Which mysql_config
Find the file path, move to the path, modify the content with vim, exit and re-execute.
Pip install mysqlclient
And it worked.
In fact, there are other modules connected to MySQL under Python, such as pymysql, etc., and it is not so troublesome to install them under Mac.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.