How to install packages with pip in Windows PowerShell

后端 未结 2 1820
遇见更好的自我
遇见更好的自我 2020-12-10 06:42

I am using Python 2.7.9 on a Windows 8 computer.

I tried to install lxml by typing pip install lxmlin Windows PowerShell after typing python

2条回答
  •  盖世英雄少女心
    2020-12-10 06:56

    Starting from Python versions 2.7.9 and 3.4.0, 'pip' is already included in the regular install. Check if the path to the 'Scripts' directory inside your Python installation directory is contained in your system's 'PATH' environment variable, so 'pip' can be found.

    Look here for more information:

    How do I install pip on Windows?

    Edit: Sounds like you are trying to run pip inside python, You shouldn't get an 'invalid syntax' error through the command prompt. More like "'pip' is not recognized". Try simply just opening command prompt and typing 'pip help'

提交回复
热议问题