简体   繁体   English

安装python环境(Windows 10)

[英]Installing python environment (windows 10)

Some years ago I installed Python 2 from the installers in their homepage. 几年前,我从安装程序主页中的安装程序安装了Python 2。 Later I needed to use Python 3 and it was a problem. 后来我需要使用Python 3,这是一个问题。 (Later I uninstalled and installed anaconda) (后来我卸载并安装了anaconda)

On that time I tried Anaconda on my Mac, and with it I have python 3 installed by default. 那时我在Mac上尝试了Anaconda,并默认安装了python 3。 When I need to use python 2 I create a virtual environment and set it to python 2. It works well but seems a little complicated. 当我需要使用python 2时,我创建了一个虚拟环境并将其设置为python2。它运行良好,但看起来有点复杂。

1) Is anaconda copying all necessary files on each virtual environment? 1)anaconda是否在每个虚拟环境上复制所有必需的文件? If that is the case, it seems it would need a lot of space, no? 如果是这样,似乎需要很多空间,不是吗?

Now I've gotten a brand new windows 10 machine for development. 现在,我已经获得了用于开发的全新Windows 10机器。 No python at all. 根本没有python。

I would want to create a clean and simple environment where I can work with both versions of python. 我想创建一个干净简单的环境,在其中我可以使用两个版本的python。 Should I stick to anaconda? 我应该坚持水蟒吗? Or is there a better way? 或者,还有更好的方法? What is the official stance of the python software foundation? python软件基金会的官方立场是什么?

If you go vanilla Python installation, it'll require you to install both from the official site. 如果您要使用香草Python安装,则需要从官方站点进行安装。

Then, there's the Pyenv project which manages python versions / virtualenvs, but I think that's only Linux and Mac 然后,有一个管理python版本/ virtualenvs的Pyenv项目,但我认为那只是Linux和Mac

If you'd like Data Science & Big Data tools, you'd want the full blown Anaconda, which takes up a reasonable amount of space, and it's unlikely you'll use everything it provides. 如果您需要数据科学和大数据工具,则需要功能强大的Anaconda,它占用了相当大的空间,并且不太可能会使用它提供的所有功能。

Anaconda developers probably realized that, and so they maintain Miniconda on the side and is just bare Python (one version, as per the installer), plus the conda utility. Anaconda开发人员可能意识到了这一点,因此他们将Miniconda保留在一边 ,只是裸露的Python(根据安装程序为一个版本),以及conda实用程序。

And with conda , you can manage additional environments 借助conda ,您可以管理其他环境

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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