在Windows上安装pep8

时间:2015-03-31 15:06:23

标签: python windows pep8

尝试在Windows 7计算机上安装pep8。所以我可以使用SublimeLiter for Sublime Text来通过python脚本进行lint。

明确安装了Python34。选中 pip 系统路径选项。

尝试:

  1. python pip install pep8。输出:python: can't open file 'pip': [Errno 2] No such file or directory
  2. https://pip.pypa.io/en/latest/installing.html下载get-pip.py并运行C:/Python34/get-pip.py install pep8。输出: Collecting install Could not find any downloads that satisfy the requirement install Some externally hosted files were ignored as access to them may be unreliable (use --allow-external install to allow). No distributions at all found for install
  3. C:/Python34/get-pip.py install pep8。输出:未找到命令。
  4. 任何建议如何在Windows上安装PEP8?

1 个答案:

答案 0 :(得分:3)

正如Neitsa建议的那样,应该使用Windows的-m(模块)选项,以便通过PiP安装模块。

以下是CMD中的工作解决方案:

python -m pip install pep8

积分归于Naitsa。