[英]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. 我在Windows中安装了一个python3,但事情并没有真正配置好。 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
. 我是一个身份验证代理,我安装软件包的方式是手动下载并运行
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. 这适用于某些软件包,但有一些使用easy_install自动下载依赖项,并且这些依赖于代理,因此我必须找到所有依赖项并手动下载并安装它们。 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:
所以我的问题是:
Most programs are working better with plain proxies, so give Cntlm a try. 大多数程序使用普通代理更好地工作,所以试试Cntlm 。
As for the first question, install Python 3 then make an one-line v.cmd
file with this content: 至于第一个问题,安装Python 3然后用这个内容制作一个单行的
v.cmd
文件:
@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. 当然,为pip激活缓存会使事情变得更快。 Just put this content in
%APPDATA%\\pip\\pip.ini
: 只需将此内容放在
%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): 您可以尝试使用支持代理(包括身份验证)的
pip
:
http://pypi.python.org/pypi/pip http://pypi.python.org/pypi/pip
我不知道这是否会对你有所帮助,但是这个网站有很多捆绑为二进制文件的软件包http://www.lfd.uci.edu/~gohlke/pythonlibs/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.