11

MacOSX问题:ImportError: No module named ‘_scproxy’

 3 years ago
source link: https://xushanxiang.com/2019/11/macosx-importerror-no-module-named-_scproxy.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

MacOSX问题:ImportError: No module named ‘_scproxy’

作者: xusx 分类: Python 发布时间: 2019-11-10 13:40

Mac下安装Python对版本管理软件PyEnv后,再安装某个版本的Python市遇到下面报错信息。

pyenv install 3.5.7
python-build: use [email protected] from homebrew
python-build: use readline from homebrew
Downloading Python-3.5.7.tar.xz…
-> https://www.python.org/ftp/python/3.5.7/Python-3.5.7.tar.xz
Installing Python-3.5.7…
python-build: use readline from homebrew
BUILD FAILED (OS X 10.14.6 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/g5/y2s0vp1506g5ybtgk5wz8l4r0000gn/T/python-build.20191110124944.46811
Results logged to /var/folders/g5/y2s0vp1506g5ybtgk5wz8l4r0000gn/T/python-build.20191110124944.46811.log
Last 4 log lines:
File "/private/var/folders/g5/y2s0vp1506g5ybtgk5wz8l4r0000gn/T/python-build.20191110124944.46811/Python-3.5.7/Lib/urllib/request.py", line 2521, in
from _scproxy import _get_proxy_settings, _get_proxies
ImportError: No module named '_scproxy'
make: *** [install] Error 1

执行下面命令可以安装指定版本的Python。

SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk MACOSX_DEPLOYMENT_TARGET=10.14 pyenv install 3.7.3

相关文章:

1、Mac下使用pyenv安装、管理多个Python版本

2、Python虚拟环境virtualenv的安装和使用

1、https://stackoverflow.com/questions/51551557/pyenv-build-failed-installing-python-on-macos

2、https://stackoverflow.com/questions/5647023/no-module-named-scproxy-on-osx

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!

发表评论 取消回复

电子邮件地址不会被公开。 必填项已用*标注


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK