Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
REFINITIV
Question by milan.hedstrom · Jul 02, 2020 at 10:05 AM · requests

No Module named 'requests'

Hi all, I am hoping for a little help. In Visual Studio I am running some code and am getting an error with import requests, when I run the code, it tells me no module named 'requests'. However, if I run the same code in Jupyter notebook it works fine. I have run pip install requests in my environment and it is already satisfied. Any ideas on why it would work in one notebook vs. the other?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by milan.hedstrom · Jul 06, 2020 at 09:49 AM

0 Like Reply Share

More...


Initially I used pip install requests within VS. The request came back, all requirements satisfied. I restarted VS with a new terminal and tried pip install requests again. This time it installed requests and then everything worked fine.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by chavalit.jintamalit · Jul 02, 2020 at 10:52 AM

Hi @milan.hedstrom

I have never used Visual Studio but from your question, it seems to be a Visual Studio environment issue.

So I google "visual studio pip install python" and I got this url,

https://docs.microsoft.com/en-us/visualstudio/python/tutorial-working-with-python-in-visual-studio-step-05-installing-packages?view=vs-2019

Hope this help.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by umer.nalla · Jul 02, 2020 at 11:31 AM

Hi @milan.hedstrom

I had similar issues myself when I was trying out VS and for me, it was as explained in the link above - my VS and Jupyter were using different Python environments.

the missing package was installed in the Jupyter used env but not in the VS env

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
milan.hedstrom · Jul 02, 2020 at 12:09 PM 0
Share

Thanks, I had that thought as well. I then opened a terminal within VS and did pip install requests and it comes up as already satisfied...

avatar image
REFINITIV
Answer by milan.hedstrom · Jul 02, 2020 at 12:48 PM

it is working now, I have figured it out. Many thanks for the replies.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
milan.hedstrom · Jul 06, 2020 at 09:48 AM 0
Share

Initially I used pip install requests within VS. The request came back, all requirements satisfied. I restarted VS with a new terminal and tried pip install requests again. This time it installed requests and then everything worked fine.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

Hi Community, I am a newbie! Does anyone know a Phyton command for downloading Excel docs from the Eikon Commodities Library?

Downloading excel file from eikon link with python

Python: amount of datapoints allowed per request.

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges