[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Python not finding module

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 3

File: python-logo-master-flat (1).png (21KB, 1487x645px) Image search: [Google]
python-logo-master-flat (1).png
21KB, 1487x645px
I've keep getting an "ImportError: No module named 'requests'" error when trying to use the requests module in Python 3.5.2 on a Windows 10 machine.

I installed anaconda which includes it and pip confirmed it's installed. Anyone have any idea what I might be doing wrong and why Python can't seem to find it?

I'm also trying to use lxml and I get the same situation. Other libraries aren't causing this problem.
>>
Can you import the module in Python's REPL, either CLI or IDLE?
>>
>pip
absolutelydisgusting.bmp
>>
File: Capture.png (6KB, 478x163px)
Capture.png
6KB, 478x163px
>>56952360
I've been working in the IDLE directly
>>
File: Capture.png (14KB, 650x200px) Image search: [Google]
Capture.png
14KB, 650x200px
>>56952522
>>
>>56952342
If you're usinganaconda, it should be pretty straightforward. You can create an environment in jupyter notebook, or in the command prompt.
Just open ccommand, type conda, then do:
conda create -n nameofenvironment python=3.5
Which will create your environment.
Then you'll want to activate your environment by typing:
activate nameofenvironment
Then if you need pip to install your module, use pip within the activated environment (you should see the environment name in parenthesis before the command line).
>>
>>56952342
>>56954542
As a follow on point, if your module requires dependencies, I've found that with pip; you sometimes need to install them in order before installing your desired module. Oftentimes it's easiest to install the git module and then install your modules directly from github, since they'll have a file that contains instructions to install the dependencies.
Also, in future, use stack overflow. The questions/answers are permanent, and they're more likely to know how to solve your problem.
>>
>>56954542
Will do in the future, thanks so much for your help. I used Spyder which seems to have fixed it!
Thread posts: 8
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.