win7安装pip、mitmproxy

安装pip https://pip.pypa.io/en/latest/installing.html

步骤:

下载 https://bootstrap.pypa.io/get-pip.py

python get-pip.py
D:\pip>python get-pip.py
Collecting pip
  Downloading pip-6.0.6-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 74kB/s ta 0:00:011
Collecting setuptools
  Downloading setuptools-12.0.4-py2.py3-none-any.whl (502kB)
    100% |################################| 503kB 117kB/s ta 0:00:01
Installing collected packages: setuptools, pip

Successfully installed pip-6.0.6 setuptools-12.0.4
python -m pip
Usage:
  D:\Python27\python.exe -m pip <command> [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  zip                         DEPRECATED. Zip individual packages.
  unzip                       DEPRECATED. Unzip individual packages.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output.
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don‘t periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.

安装依赖包

python -m pip install netlib pyopenssl pyasn1 urwid pil lxml flask

错误:

File "D:\Python27\lib\mimetypes.py", line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xb0 in position 1: ordinal not in range(128)

解决方案:

打开D:\Python27\lib\mimetypes.py文件,在256行,将

default_encoding = sys.getdefaultencoding()

改为

        if sys.getdefaultencoding() != ‘gbk‘:
            reload(sys)
            sys.setdefaultencoding(‘gbk‘)
        default_encoding = sys.getdefaultencoding()

由于pil安装出错,所以先:

python -m pip install netlib pyopenssl pyasn1 urwid lxml flask

然后:

python -m pip install pyamf protobuf

又出错:

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27

需要装 Microsoft Visual C++ Compiler for Python 2.7(共 83.8 MB)

http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

再试:

python -m pip install pyamf protobuf

下一步:

python -m pip install pil --allow-external PIL --allow-unverified PIL

下一步:

python -m pip install nose pathod countershape

最后:

python -m pip install mitmproxy

参考资料:

https://pip.pypa.io/en/latest/installing.html
http://m.blog.csdn.net/blog/roler_/40398789
http://netsecurity.51cto.com/art/201311/416548.htm
http://www.ajucs.com/archives/565.html

时间: 2024-10-04 23:36:21

win7安装pip、mitmproxy的相关文章

Win7 Python2.7.6 安装pip,setuptools

1.先安装python2.7.6解析器 2.下载 ez_setup.py:代码资源 从cmd进入当前路径(可以找到的ez_setup.py地方,笔者将其放到的安装python的路径下),执行: python ez_setup.py 但是在安装setuptools遇到如下问题: mimetypes.init() # try to read system mime.types File "J:\Program Files (x86)\Python\Python27\lib\mimetypes.py&

Python学习笔记(一)三步走安装pip

pip是用来方便地管理Python的第三方包的,由于此前玩Python仅仅是浅尝辄止,用的是python(x,y),但是这里并不代表你想用什么包都能从里面找到的,所以我把python(x,y)卸了,然后重新装了个Python2.7.5,准备尝试一下用pip来下载想要的包. 不过pip也有一个麻烦之处,如果电脑不能联网怎么办? 之后再考虑这个问题,先在此记录一下我是如何安装pip的.本文参考百度经验<如何在win7下安装python包工具pip>,网上有很多pip安装教程,但感觉这个写的是最简明

windows下Python三步安装pip

pip是用来方便地管理Python的第三方包的,由于此前玩Python仅仅是浅尝辄止,用的是python(x,y),但是这里并不代表你想用什么包都能从里面找到的,所以我把python(x,y)卸了,然后重新装了个Python2.7.13,准备尝试一下用pip来下载想要的包. 不过pip也有一个麻烦之处,如果电脑不能联网怎么办? 之后再考虑这个问题,先在此记录一下我是如何安装pip的.本文参考百度经验<如何在win7下安装python包工具pip>,网上有很多pip安装教程,但感觉这个写的是最简

win7安装Anaconda+TensorFlow+配置PyCharm(转)

win7安装Anaconda+TensorFlow+配置PyCharm 2017年03月31日 10:52:17 阅读数:24251 先总结自己遇到的坑:(回头想想其实安装很简单) 第一大坑:anaconda必须安装4.2版本,不能安装4.3 版本:满满的血泪史 因为我们需要安装自带的python必须是3.5,才可以调用TensorFlow 但是anaconda4.3自带是python3.6 ,无法调用TensorFlow 第二坑: google那群人已经将安装进一步简化,千万不要像过去安装还用

解决win7 安装完jdk7后,再安装jdk8出现的问题 has value &#39;1.8&#39;, but &#39;1.7&#39; is required.

http://blog.csdn.net/qiyueqinglian/article/details/46605759 电脑装了jdk8,JAVA_HOME也是设置的8. 不删除8变回7. 改了JAVA_HOME,并且path值里的C:\ProgramData\Oracle\Java\javapath也删了 运行java -version,报错 Error: Registry key ‘Software\JavaSoft\Java Runtime Environment’\CurrentVers

centos安装pip

centos下使用yum 安装pip 1.首先安装epel扩展源: yum -y install epel-release 2.然后再安装pip yum -y install python-pip

python安装pip的方法

1.下载https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip python setup.py install #安装 setuptools 2.下载https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar python setup.py instal

linux升级python2.7,安装pip,setuptools,zlib

1,在192.168.0.65装python2.7和PIP     #ssh 192.168.0.65         升级到python2.7     #cd /usr/local     #wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz         # tar zxvf Python-2.7.10.tgz     # cd Python-2.7.10     # mkdir /usr/local/Python

安装pip和json

安装pip #ubuntu sudo apt-get install python3-pip #CentOS 7 for Python 2.x yum install python-setuptools #CentOS 7 for Python 3.x yum install python34-setuptools easy_install pip 如果嫌慢,手动下载源码包安装 wget https://pypi.python.org/packages/11/b6/abcb525026a4be0