在Windows计算机上安装Python的三种方法

由Elise | 一月10,2017 (by Elise | January 10, 2017)

介绍 (Intro)

Python is a widely used general-purpose programming language. It’s a great tool for data scientists for data exploration, visualization and analysis.

Python是一种广泛使用的通用编程语言。 对于数据科学家来说,它是进行数据探索,可视化和分析的绝佳工具。

I didn’t start learning Python until I’d already learned another language for analytics called SAS, which is popular in academia. I started learning Python online using DataCamp, where you can take an intro class for free and start writing Python code right in your broswer.

在学习了另一种称为SAS的分析语言之后,我才开始学习Python,该语言在学术界很流行。 我开始使用DataCamp在线学习Python,在那里您可以免费参加入门课程,然后开始在自己的浏览器中编写Python代码。

DataCamp Python Tutorial

DataCamp Python教程

One of the huge perks of Python over SAS is that Python is open source and totally free. One of the downsides is that despite the Python community’s attempts to make it an accessible tool for everyone, a lot of folks find the installation process daunting or confusing, including myself. Once I’d learned enough Python to tinker around, I didn’t know where to “go” on my computer to write it or what to do next.

Python在SAS上的巨大优势之一是Python是开源的并且完全免费。 缺点之一是,尽管Python社区试图使它成为每个人都可以使用的工具,但许多人仍然发现安装过程令人生畏或令人困惑,包括我自己。 一旦我学习了足够多的Python来进行修改,我就不知道在计算机上“去”哪里编写它或下一步要做什么。

Today I’ll cover three ways to install Python on your Windows computer step by step.

今天,我将逐步介绍在Windows计算机上安装Python的三种方法。

选项1(推荐) (Option 1 (Recommended))

The easiest and fastest way to get started with Python is to download Yhat’s free Python app, Rodeo. The app includes a text editor where you can write and execute Python code, plus useful additions like a history tab, file navigator, and plots tab. It also has a few introductory tutorials in the sidebar for folks who are totally new to Python like I was.

开始使用Python的最简单,最快的方法是下载Yhat的免费Python应用程序Rodeo 。 该应用程序包括一个文本编辑器,您可以在其中编写和执行Python代码,以及一些有用的附加功能,例如“历史记录”选项卡,“文件导航器”和“绘图”选项卡。 它还在侧边栏中提供了一些入门教程,供那些像我一样刚接触Python的人们使用。

Rodeo comes with Python installed as part of the app download, so that you don’t have to do any additional steps before you start using Python. Rodeo comes with a distribution of Python called Miniconda, which we discuss below, plus the additional “place” or environment dedicated to writing Python code.

Rodeo随应用程序下载一起安装了Python,因此在开始使用Python之前,您无需执行任何其他步骤。 Rodeo随附了一个名为Miniconda的Python发行版,我们将在下面进行讨论,以及专门用于编写Python代码的其他“场所”或环境。

要下载Rodeo(包括Miniconda,因此包括Python): (To download Rodeo (includes Miniconda, and therefore Python):)
  • Go to https://www.yhat.com/products/rodeo
  • Click the blue Download for Windows button, or if the button reads Download for Mac, click the “Other Platforms” subtext below and select Windows
  • A file with the extension .exe should begin to download
  • Double click the .exe file and follow the instructions on the screen. If you’re unsure about any setting, simply accept the defaults as they can all be changed later.
  • When you’re finished, the Rodeo app will open. Python is included and already installed, so you can get straight to coding in the text editor (top left pane))! For example, try typing print(“Hello world!”) and pressing command+return, or clicking the Run Line button.
  • 前往https://www.yhat.com/products/rodeo
  • 单击蓝色Download for Windows按钮,或者如果按钮显示Download for Mac ,请单击下面的“其他平台”子文本,然后选择Windows
  • 扩展名为.exe文件应开始下载
  • 双击.exe文件,然后按照屏幕上的说明进行操作。 如果您不确定任何设置,只需接受默认设置即可,以后都可以更改它们。
  • 完成后,Rodeo应用程序将打开。 Python已包含并且已经安装,因此您可以直接在文本编辑器(左上方窗格)中进行编码! 例如,尝试键入print(“Hello world!”)并按Command + Return,或单击“ Run Line按钮。

选项2(Anaconda) (Option 2 (Anaconda))

Anaconda is a free distribution of Python provided by Continuum Analytics. It includes a lot of the most popular data science packages installed as well (150 in total + another 250 can be installed with the conda install command), ready for use. Unlike Rodeo, when you download Anaconda, you do not also get an environment (you’ll often hear them called IDE’s, which stands for interactive development environment) for doing your data exploration/analysis with Python. To get specific, Rodeo actually installs with Miniconda, which is a lighter alternative to Anaconda. Minconda comes just with Python and conda. Here’s a great post about the differences between Conda, Anaconda, and Miniconda on Continuum’s blog if you want to know more.

Anaconda是Continuum Analytics提供的Python的免费发行版。 它还包含许多已安装的最受欢迎的数据科学软件包(总共150个+可以使用conda install命令安装另外250个),可以使用。 与Rodeo不同,当您下载Anaconda时,您并没有获得使用Python进行数据探索/分析的环境(您经常会听到它们称为IDE的意思是交互式开发环境)。 具体来说,Rodeo实际上安装了Miniconda,这是Anaconda的轻巧替代品。 Minconda附带Python和conda。 如果您想了解更多信息,可以在Continuum的博客上撰写有关Conda,Anaconda和Miniconda之间差异的精彩文章

要下载Anaconda(包括Python): (To download Anaconda (includes Python):)
  • Go to https://www.continuum.io/downloads
  • Click the green 64-bit Installer button (unless you want Python 2.7, which will retire in 2020)
  • A file with the extension .exe should begin to download
  • Double click the .exe file and follow the instructions on the screen. If you’re unsure about any setting, simply accept the defaults as they can all be changed later.
  • When you’re finished, a new terminal window will open. If not, click Start – Run – Command – Prompt.
  • You can start coding in your terminal. For example, try typing print(“Hello world!”) and pressing return.
  • 转到https://www.continuum.io/downloads
  • 单击绿色的64-bit Installer按钮(除非您想要Python 2.7,它将在2020年退役)
  • 扩展名为.exe文件应开始下载
  • 双击.exe文件,然后按照屏幕上的说明进行操作。 如果您不确定任何设置,只需接受默认设置即可,以后都可以更改它们。
  • 完成后,将打开一个新的终端窗口。 如果没有,请单击开始–运行–命令–提示。
  • 您可以在终端中开始编码。 例如,尝试键入print(“Hello world!”)然后按回车键。

选项3(最低裸机) (Option 3 (Bare minimum))

As we mentioned above, Rodeo or Anaconda will both include Python, as well as additional nice-to-haves. But, If you aren’t interested in downloading an app built for working with Python (Option 1, Rodeo), or many of Python’s most popular packages (Anaconda), you can always download just the bare bones programming language.

如上所述,Rodeo或Anaconda都将包含Python以及其他一些不错的东西。 但是,如果您不希望下载为使用Python(选项1,Rodeo)或Python最流行的软件包(Anaconda)而构建的应用程序,则始终可以只下载基本的编程语言。

To download Python:

要下载Python:

  • Go to https://www.python.org/downloads/windows/
  • Click Latest Python 3 Release - Python 3.6.0 (as of current date 🙂 )
  • Scroll to the bottom of the page to the Files table and find the Windows x86 executable installer. If you want to download a different file type, feel free to do so.
  • Double click the .exe file and follow the instructions on the screen. If you’re unsure about any setting, simply accept the defaults as they can all be changed later.
  • You will notice that the installation brings up a command prompt window and installs Pip, which is a package management tool. Pip lets you install any Python package (like those that come in preloaded in Rodeo and Anaconda) that are available for download through PyPI (Python Package Index).
  • You can start coding in either your terminal or in IDLE. Simply search for Python in your programs and open either IDE or the command line and run a line of code. For example, try typing print(“Hello world!”) and pressing return.
  • 转到https://www.python.org/downloads/windows/
  • 单击Latest Python 3 Release - Python 3.6.0 -Python Latest Python 3 Release - Python 3.6.0 (截至当前日期🙂)
  • 滚动到页面底部的“ Files表,然后找到Windows x86 executable installer. 如果要下载其他文件类型,请随时进行下载。
  • 双击.exe文件,然后按照屏幕上的说明进行操作。 如果您不确定任何设置,只需接受默认设置即可,以后都可以更改它们。
  • 您会注意到安装会弹出一个命令提示符窗口并安装Pip ,这是一个软件包管理工具。 Pip允许您安装任何可通过PyPI (Python软件包索引)下载的Python软件包(例如Rodeo和Anaconda中预装的软件包)。
  • 您可以在终端或IDLE中开始编码。 只需在程序中搜索Python,然后打开IDE或命令行并运行一行代码即可。 例如,尝试键入print(“Hello world!”)然后按回车键。

I hope that was a helpful guide for how to install Python on your Windows computer. Good luck & happy data-science-ing!

我希望这对如何在Windows计算机上安装Python有所帮助。 祝你好运,数据科学快乐!

翻译自: https://www.pybloggers.com/2017/01/three-ways-to-install-python-on-your-windows-computer/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值