Python Forum
Import Requests Does not Work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import Requests Does not Work
#11
(Apr-20-2018, 04:09 AM)DiceMann Wrote: The only other thing i can think of is a fresh install of windows.
Otherwise, none of this makes since.
You most tell what you have done,like have you looked at Environment Variables(Path) that i linked to before?
For me you see C:\python and C:\python36\Scripts.
This mean when i do pip install requests it will install to that version.

I have 5-6 other Python instantiation,but that dos not matter all as my main is set to 36(this is where Windows look).
Python 3.6 also install a shortcut(in Windows folder) py.exe ,that can call all versions.
[Image: lwkZgx.jpg]
Example cmd:
Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Med enerett.

C:\WINDOWS\system32>cd\

C:\>pip -V
pip 9.0.3 from c:\python36\lib\site-packages (python 3.6)

C:\>python -c "import sys; print(sys.executable)"
C:\python36\python.exe

# Now it will install to 3.6,as shown over
C:\>pip install requests --upgrade
Requirement already up-to-date: requests in c:\python36\lib\site-packages
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in c:\python36\lib\site-packages (from requests)
Requirement already up-to-date: idna<2.7,>=2.5 in c:\python36\lib\site-packages (from requests)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in c:\python36\lib\site-packages (from requests)
Collecting certifi>=2017.4.17 (from requests)
  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
    100% |████████████████████████████████| 153kB 1.8MB/s
Installing collected packages: certifi
  Found existing installation: certifi 2018.1.18
    Uninstalling certifi-2018.1.18:
      Successfully uninstalled certifi-2018.1.18
Successfully installed certifi-2018.4.16
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

# Access 2.7,using py
C:\>py -2.7 -V
Python 2.7.9

C:\>py -3.4 -V
Python 3.4.2

C:\>py -3.5 -V
Python 3.5.2

# Install to 2.7
C:\>py -2.7 -m pip install requests --upgrade
Requirement already up-to-date: requests in c:\python27\lib\site-packages
Requirement already up-to-date: idna<2.7,>=2.5 in c:\python27\lib\site-packages (from requests)
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in c:\python27\lib\site-packages (from requests)
Collecting certifi>=2017.4.17 (from requests)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in c:\python27\lib\site-packages (from requests)
Installing collected packages: certifi
  Found existing installation: certifi 2017.7.27.1
    Uninstalling certifi-2017.7.27.1:
      Successfully uninstalled certifi-2017.7.27.1
Successfully installed certifi-2018.4.16
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\>
Reply


Messages In This Thread
Import Requests Does not Work - by DiceMann - Apr-15-2018, 09:17 PM
RE: Import Requests Does not Work - by snippsat - Apr-15-2018, 10:16 PM
RE: Import Requests Does not Work - by DiceMann - Apr-16-2018, 01:44 AM
RE: Import Requests Does not Work - by snippsat - Apr-16-2018, 11:26 AM
RE: Import Requests Does not Work - by DiceMann - Apr-17-2018, 02:16 AM
RE: Import Requests Does not Work - by snippsat - Apr-17-2018, 03:38 AM
RE: Import Requests Does not Work - by DiceMann - Apr-18-2018, 04:35 AM
RE: Import Requests Does not Work - by DiceMann - Apr-20-2018, 04:09 AM
RE: Import Requests Does not Work - by wavic - Apr-20-2018, 04:53 AM
RE: Import Requests Does not Work - by snippsat - Apr-20-2018, 09:07 AM
RE: Import Requests Does not Work - by ljmetzger - Apr-20-2018, 01:18 PM
RE: Import Requests Does not Work - by DiceMann - Apr-24-2018, 02:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pip install requests doesnt work misodca 8 6,701 Jul-07-2023, 08:04 AM
Last Post: zyple
  getting an import statement to work in my program barryjo 1 1,703 Dec-06-2021, 04:28 PM
Last Post: snippsat
  Import requests/beautifulsoup problem Jokadaro_ 3 2,110 Dec-05-2021, 01:22 PM
Last Post: Jokadaro_
  'urllib3' Module not found when import 'requests' spanz 5 10,570 Jan-06-2021, 05:57 PM
Last Post: snippsat
  Does "import xlrd" work in Thonny? cnutakor 3 3,068 Apr-30-2020, 12:41 AM
Last Post: Larz60+
  import scalalib package doesn't work manu_brighter 2 2,958 Apr-17-2020, 06:36 PM
Last Post: snippsat
  [split] import PIL dont work vedansh 1 2,118 Mar-29-2020, 10:00 AM
Last Post: Larz60+
  import PIL dont work rodink 14 13,170 Feb-22-2020, 08:48 PM
Last Post: snippsat
  import requests gives me error blckpstv 1 7,363 Jan-22-2017, 10:41 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020