How do I get the python requests package to work?


grace period

I can't seem to install the requests package properly. I get the same error no matter what program I actually use to run:

Traceback (most recent call last): File "/Users/garce/Desktop/songlyrics/getlyrics.py", line 2, in <module> import requests ModuleNotFoundError: No module named 'requests'

However, I have used pip to install requests. When I run pip show requestsin a terminal window the following is displayed:

Name: requests Version: 2.24.0 Summary: Python HTTP for Humans. Home-page: https://requests.readthedocs.io Author: Kenneth Reitz Author-email: [email protected] License: Apache 2.0 Location: /Users/garce/opt/anaconda3/lib/python3.8/site-packages Requires: urllib3, idna, certifi, chardet Required-by: Sphinx, jupyterlab-server, conda, conda-build, anaconda-project, anaconda-client

I think it's some kind of path issue, but I can't figure out what's going wrong here. Any ideas?

Ellie Lockhart

Are you installing the package globally or in a Pipenv environment? If globally, have you tried pipenv? Not only is it considered a best practice, but I've found that using a pipenv or Anaconda environment usually resolves the path issues I'm having.

Related


How do I get the python requests package to work?

grace period I can't seem to install the requests package properly. I get the same error no matter what program I actually use to run: Traceback (most recent call last): File "/Users/garce/Desktop/songlyrics/getlyrics.py", line 2, in <module> import requests M

How do I get the python requests package to work?

grace period I can't seem to install the requests package properly. I get the same error no matter what program I actually use to run: Traceback (most recent call last): File "/Users/garce/Desktop/songlyrics/getlyrics.py", line 2, in <module> import requests M

How do I get the python requests package to work?

grace period I can't seem to install the requests package properly. I get the same error no matter what program I actually use to run: Traceback (most recent call last): File "/Users/garce/Desktop/songlyrics/getlyrics.py", line 2, in <module> import requests M

How do I get the python requests package to work?

grace period I can't seem to install the requests package properly. I get the same error no matter what program I actually use to run: Traceback (most recent call last): File "/Users/garce/Desktop/songlyrics/getlyrics.py", line 2, in <module> import requests M

How do I get the Graal SDK package to work without Maven?

Patrick Nusszer: I am developing a Java application that needs to execute JavaScript. The Rhino JS engine is about to get deprecated and replaced is a set of APIs provided by the Graal SDK, which makes use of GraalVM. Virtual machines basically execute differe

How do I get the Grar SDK package to work without Maven?

Patrick Nusszer: I am developing a Java application that needs to execute JavaScript. The Rhino JS engine is about to get deprecated and replaced is a set of APIs provided by the Graal SDK, which makes use of GraalVM. Virtual machines basically execute differe

How do I get the Grar SDK package to work without Maven?

Patrick Nusszer: I am developing a Java application that needs to execute JavaScript. The Rhino JS engine is about to get deprecated and replaced is a set of APIs provided by the Graal SDK, which makes use of GraalVM. Virtual machines basically execute differe

How do asynchronous GET requests work?

Steve Wash I think I understand the basics of the asynchronous POST method at a high level. The big advantage is that the caller can respond quickly even if the processing of the data in the POST has not yet been completed. But I don't quite understand how thi

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Titan graph database to work with Python?

Tim Ludwinski I'm new to this and am trying to get Titan to use Python. I've spent a day and a half beating my head on this and can't get anywhere. I've tried lightbulb and rexpro-python but nothing seems to work. In rexpro-python , the following code: from re

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I

How do I get the Swagger-generated Python client to work?

pump I've generated the python client and server from https://editor.swagger.io/ - the server works fine without editing, but I can't seem to get the client to communicate with it - or with it. I suspect that what I'm doing is really stupid, but the examples I