我在MacOs Sierra中为Python 3.6安装了anaconda。 它带有自己的python,并将默认python更改为此新的。
现在,我无法从urllib导入任何内容。
这是我的终端的摘录。
有人可以提出建议吗?
devassy@mydire $ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.request import url2pathname
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/devassy/anaconda3/lib/python3.6/urllib/request.py", line 2585, in <module>
from _scproxy import _get_proxy_settings, _get_proxies
ImportError: dlopen(/Users/devassy/anaconda3/lib/python3.6/lib-dynload/_scproxy.cpython-36m-darwin.so, 2): Symbol not found: _iconv
Referenced from: /usr/lib/libcups.2.dylib
Expected in: /Users/devassy/anaconda3/lib/libiconv.2.dylib
in /usr/lib/libcups.2.dylib
>>>