python自动安装windows软件,在Windows上安装python的最佳方法是什么

I have an existing python3 installation in Windows, but things aren't really configured right. The main problem comes down to installing new packages. I am behind an authenticating proxy and the way I install packages is by manually downloading them and running python setup.py install. This works fine for some packages, but then there are some which use easy_install to automatically download dependencies, and these get stuck at the proxy, so I have to find all the dependencies and manually download and install them. This also makes it really difficult to track my own dependencies.

In the next few weeks my computer will be re-installed, so when that happens I would like to get a much better setup working. So my questions are:

virtualenv, distribute, setuptools, pip... Which of these (or any others I've missed) should I install for python3 in Windows, and in what order?

How can I get them working behind an authenticating proxy?

解决方案

Most programs are working better with plain proxies, so give Cntlm a try.

As for the first question, install Python 3 then make an one-line v.cmd file with this content:

@X:\full\path\to\python.exe y:\full\path\to\virtualenv.py --distribute --unzip-setuptools %*

When you need an virtual envinronment, go to the desired folder and run:

v.cmd .

or provide the full path to that folder as the argument instead of .

Of course, activating the cache for pip will make things faster. Just put this content in %APPDATA%\pip\pip.ini:

[install]

download-cache=z:/full/path/to/your/pip/cache

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值