Python Forum
Noob warning: trying to use pip to install pytest and pep8 in Command Prompt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noob warning: trying to use pip to install pytest and pep8 in Command Prompt
#4
Look at this link.
(Dec-20-2020, 12:25 AM)adifrank Wrote: 'C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
Look at link under Fixing Path if needed
[Image: GUgLry.jpg]
For you need to add these paths in Environment Variables Path.
C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\
C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\
Restart Pc.
(Dec-20-2020, 12:25 AM)adifrank Wrote: WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
After fixing Windows Paths,now will python and pip from work anywhere in cmd.
C:\>python -m pip install --upgrade pip
Collecting pip
  Downloading pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 364 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.4
    Uninstalling pip-20.2.4:
      Successfully uninstalled pip-20.2.4
Successfully installed pip-20.3.3

C:\>pip -V
pip 20.3.3 from c:\python38\lib\site-packages\pip (python 3.8)

C:\>
MK_CodingSpace Wrote:I have made a short video on how to correctly install Python modules/libraries step by step. See if it helps. Most likely the pip command line wasn't in the correct path when you run it.
Should really be fixing environment variables Path,so don't need to go into Scripts folder for using pip.
So for ease of use should python and pip main Python version work from anywhere in cmd.
py can be used to access other Python version if that's needed.
C:\                                                                                                            
λ py -3.6 -V                                                                                                   
Python 3.6.4                                                        
                                                      
C:\                                                                                                            
λ py -2.7 -V                                                                                                   
Python 2.7.9                                                                                                   
                                                                                                                
C:\                                                                                                            
λ # Using pip to install to 2.7                                                                            
λ py -2.7 -m pip install logzero                                                                               
Requirement already satisfied: logzero in c:\python27\lib\site-packages
adifrank likes this post
Reply


Messages In This Thread
RE: Noob warning: trying to use pip to install pytest and pep8 in Command Prompt - by snippsat - Dec-20-2020, 01:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pytest Installed, but VS Code Won’t Access Pytest AstralWeeks 9 4,227 Sep-13-2023, 03:00 PM
Last Post: AstralWeeks
  What is the difference between Command Prompt and Sublimes yaoyao22 1 760 Jul-09-2023, 02:56 PM
Last Post: snippsat
  Pytest mocks anthonyrmoss78 0 536 May-30-2023, 08:28 PM
Last Post: anthonyrmoss78
  New to python, question regarding PEP8 AthertonH 3 1,622 Apr-14-2022, 06:49 AM
Last Post: buran
  Facing Problem while opening a file through command prompt vlearner 4 2,123 Jan-30-2022, 08:10 AM
Last Post: snippsat
  Packages inconsistent warning during hdbscan install Led_Zeppelin 0 2,012 Aug-31-2021, 04:10 PM
Last Post: Led_Zeppelin
  Running Python in Command Prompt Anwar 3 3,276 Nov-15-2020, 03:15 PM
Last Post: snippsat
  starting python from windows command prompt MaartenRo 4 2,998 Sep-04-2020, 12:25 PM
Last Post: MaartenRo
  "pip install -e ." returns : ERROR: Command errored out with exit status 1 mostafaPython 3 5,650 Jun-09-2020, 09:28 AM
Last Post: snippsat
  Pytest and rootdirectory Master_Sergius 4 4,973 Jun-01-2020, 05:05 PM
Last Post: Master_Sergius

Forum Jump:

User Panel Messages

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