Masonite - 工艺新命令抛出模块 'urllib' 没有属性 'urlopen' 错误

Masonite - craft new command throws module 'urllib' has no attribute 'urlopen' error

我正在尝试使用 Masonite 框架,我刚刚安装了 masonite-cli 包,每当我 运行 craft new 时,都会抛出 Attribute Error - module 'urllib' has no attribute 'urlopen'。我的基本 Python 版本是 2.7,但我安装了 3.6。

虽然这个错误有点模棱两可,但它似乎是由于 Python 版本不正确而引发的,但基本工艺命令被设计为 运行 on [=18] =] 2 和 Python 3.

话虽如此,这个错误很可能是因为 SSL 证书错误,因为 Python 3.6 没有附带证书。您可以在此处阅读有关修复此错误的更多信息:

但是解决这个问题的方法是运行:/Applications/Python\ 3.6/Install\ Certificates.command