gpt4 book ai didi

macos - Mac 上的 Pip 安装失败

转载 作者:行者123 更新时间:2023-12-02 05:02:16 29 4
gpt4 key购买 nike

“sudo easy_install pip”失败并出现以下错误:

Traceback (most recent call last):
File "/usr/bin/easy_install-2.7", line 11, in <module>
load_entry_point('setuptools==18.5', 'console_scripts', 'easy_install')()
File "/Users/swastika.singhal/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 572, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/swastika.singhal/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
return ep.load()
File "/Users/swastika.singhal/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 2408, in load
return self.resolve()
File "/Users/swastika.singhal/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 2414, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 46, in <module>
from setuptools.archive_util import unpack_archive
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/archive_util.py", line 15, in <module>
from pkg_resources import ensure_directory, ContextualZipFile
ImportError: cannot import name ContextualZipFile

到目前为止,Google 解决方案对我来说不起作用。

最佳答案

这个 GitHub 问题帮助我修复了它:github.com/PyMySQL/mysqlclient-python/issues/169

具体:

mysql_config 中有如下行:

# Create options 
libs="-L$pkglibdir"
libs="$libs -l "

我将它们编辑为:

# Create options 
libs="-L$pkglibdir"
libs="$libs -lmysqlclient -lssl -lcrypto"

关于macos - Mac 上的 Pip 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48348773/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com