简体   繁体   中英

What is the best way to install python on Windows

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:

  1. virtualenv, distribute, setuptools, pip... Which of these (or any others I've missed) should I install for python3 in Windows, and in what order?
  2. 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

You might try using pip , which has support for proxies (including authentication):

http://pypi.python.org/pypi/pip

我不知道这是否会对你有所帮助,但是这个网站有很多捆绑为二进制文件的软件包http://www.lfd.uci.edu/~gohlke/pythonlibs/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM