Import Doesn't Import

Joel Goldstick joel.goldstick at gmail.com
Thu Oct 16 18:28:26 EDT 2014


On Thu, Oct 16, 2014 at 5:29 PM, Emile van Sebille <emile at fenx.com> wrote:
> On 10/15/2014 5:40 PM, ryguy7272 wrote:
>>
>> ImportError: No module named 'urllib2'
>> I'm telling Python to import because it doesn't exist and it throws an
>> error.  I don't get it; I just don't get it.  If I'm working with R, I can
>> import thousands of libraries with no errors whatsoever.  With Python, I
>> just get thousands of errors with nothing working whatsoever.  I totally
>> don't understand this language.  Import means import.  Right.  WTF!!!!!
>
>
> So, maybe Import doesn't mean import -- perhaps you expect import to
> retrieve content from the web and make it importable(1). That's not what
> python's import does. Python's version looks for a local module to import.
>
> I'd suggest starting with the tutorial.
>
> Emile
>
>
> (1) which would imply execution of arbitrary code.
>
> --
> https://mail.python.org/mailman/listinfo/python-list

requests is a better choice than urllib


-- 
Joel Goldstick
http://joelgoldstick.com



More information about the Python-list mailing list