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
>>56952360
I've been working in the IDLE directly
>>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!