无法在Windows 10上安装PIP

时间:2016-03-21 16:02:54

标签: python pip

我从https://www.python.org/downloads/release/python-351/运行了Python 3.5.1安装程序。但是,在命令行中,当我运行pip时,我看到一个错误:'pip' is not recognized as an internal or external command

有什么不对吗?

2 个答案:

答案 0 :(得分:9)

解决方案是从以下位置获取最新的pip安装程序脚本: https://bootstrap.pypa.io/get-pip.py,并使用python get-pip.py安装。

然后,您可以使用python -m pip ...这样的命令来处理您心中的内容。

答案 1 :(得分:5)

您必须将pip的路径添加到环境变量中。 Pip包含在python的脚本目录中。

示例我的案例:C:\ Python34 \ Scripts \ pip.exe

添加环境变量的路径。

  1. 按住赢取并按暂停
  2. 单击“高级系统设置”。
  3. 单击“环境变量”。
  4. module Main ( main ) where import System.Random main :: IO () randomList :: Int -> [Int] -> StdGen -> [Int] randomList 0 xlist _ = reverse xlist randomList n xlist gen = randomList (n-1) (randomVal : xlist) gen' where (randomVal, gen') = randomR (1,n) gen shuffle :: [Int] -> [String] -> [String] -> [String] shuffle [] _ deckB = deckB shuffle pl deckA deckB = shuffle (tail pl) (hs ++ tail ts) (head ts : deckB) where (hs, ts) = splitAt (pos-1) deckA pos = head pl ranks = ["2","3","4","5","6","7","8","9","T","J","Q","K","A"] suits = ["C","D","H","S"] deck = [rank ++ suit | suit <- suits, rank <- ranks] main = do gen <- newStdGen let len = 52 :: Int let permutationList = randomList len [] gen let newDeck = shuffle permutationList deck [] print permutationList print deck print "-------------------------------------" print newDeck (抱歉,我不知道python 3.5&#39;目录的名称)添加到系统变量上的C:\Python34\Scripts
  5. 重新启动命令提示符。
  6. 修改

    另一方面,您可以使用pip-Win而不是pip。在此处阅读更多内容:https://sites.google.com/site/pydatalog/python/pip-for-windows