0

I installed anaconda for Python 3.6 in MacOs Sierra. It comes with its own python and it changed the default python to this new one.

Now, I am not able to import anything from urllib.

Here is a snippet of my terminal.

Can someone give some suggestions?

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
>>> 
V. Geary
  • 3
  • 1
Coniferous
  • 111
  • 5
  • i have the same python installed with Anaconda and it works fine, What is urllib and does it need to be installed using conda? – Natsfan Aug 27 '18 at 22:32
  • Check out this link about urllib: https://stackoverflow.com/questions/34475051/need-to-install-urllib2-for-python-3-5-1 – Natsfan Aug 27 '18 at 22:37
  • Did you ever resolved this issue? I'm finding myself with the same error, only I get it while compiling python trying to build _scproxy – Fanchi Dec 11 '18 at 15:39
  • @Fanchi Yes I resolved it. I had to uninstall my original python (2.7) and install python 3.6 in my system. – Coniferous Dec 12 '18 at 08:33

0 Answers0