Collecting mysqlclient Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'setuptools' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-p8wpb1kf/mysqlclient/
需要安装一下 setuptools 包:
1
pip install setuptools==33.1.1
macOS
macOS 需要先用 brew 安装 mysql,然后才能正常安装 mysqlclient
1 2 3 4
brew install mysql brew services start mysql mysql_secure_installation # 初始化数据库,期间需要输入密码,非必需 pip3 install mysqlclient