ImportError OS X

On PyCharm I get an import error as below:

/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/nevdowling/PycharmProjects/py3/file2.py
import urllib.request
ImportError: No module named 'urllib.request'; 'urllib' is not a package

but from Terminal no probs
192-168-1-2:~ nevd$ python3
Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import urllib.request


Newbie to both MacOS & PyCharm, but as the module works OK from Terminal I assume the problem must be PyCharm configuration. Under File>Default Settings>Default Project>Project Interpreter the project interpreter is 3.5.0 but below that I only see 2 Packages: pip 7.1.2 & setuptools 18.2.  Below that is a + icon to select packages, but I haven't tried that yet as it works from Terminal. Any suggestions?

Mac OS X v10.11.1 (El Capitan) and PyCharm Community 5.0.1
1 comment
Comment actions Permalink
a file was named urllib.py, renamed and it works now.
0

Please sign in to leave a comment.