简体   繁体   English

在 Mac 上安装 Python 的最佳(和安全)方法是什么?

[英]What is really the best (and secure) way to install Python on a Mac?

I am about to start a course on Python and I am just confused and overwhelmed about how to go about installing Python on my Mac running Catalina.我即将开始关于 Python 的课程,我只是对如何在运行 Catal 的 Mac 上安装 Python 的 go 感到困惑和不知所措。 For most of the articles I found a Homebrew approach was recommended, so I went down that path.对于大多数文章,我发现推荐使用 Homebrew 方法,所以我沿着这条路走。 Or at least I tried, but for some reason I couldn't install it even with something as simple as pasting and running on terminal.或者至少我试过了,但由于某种原因,即使在终端上粘贴和运行这样简单的东西,我也无法安装它。 I then ended up messing with my files (I am a rookie, really didn't know what I was doing) trying to get brew working, but somehow using PATH, sudo, and /usr/local I ended up doing something to my OS that immediately made the system unresponsive and behave in weird ways.然后我最终弄乱了我的文件(我是一个菜鸟,真的不知道我在做什么)试图让 brew 工作,但不知何故使用 PATH、sudo 和 /usr/local 我最终对我的操作系统做了一些事情这立即使系统无响应并以奇怪的方式运行。 Long story sort I ended up reseting the disk and starting from zero.长话短说,我最终重置了磁盘并从零开始。 I would really appreciate a guide into what really is the most secure way to get python on my Mac.我真的很感激在我的 Mac 上获取 python 的最安全方法的指南。 After the experience I had trying with Homebrew, and doing a bit of research (reading things like this: https://applehelpwriter.com/2018/03/21/how-homebrew-invites-users-to-get-pwned/ ), I am really overwhelmed since I need to get python 3 and virtual env on my computer, but I don't want to put my system at risk due to my lack of experience and really understanding of what is going on with this different options.在我尝试使用 Homebrew 并进行了一些研究之后(阅读如下内容: https://applehelpwriter.com/2018/03/21/how-homebrew-invites-users-to-get-pwned/ ) ,我真的不知所措,因为我需要在我的计算机上安装 python 3 和虚拟环境,但我不想因为缺乏经验和真正了解这些不同选项的情况而将我的系统置于危险之中。

I'd recommend heading over to the Python website and downloading Python from there.我建议前往Python 网站并从那里下载 Python。 Just follow all the steps you are given which should be quite easy to follow and you have Python installed!只需按照您给出的所有步骤进行操作,这些步骤应该很容易执行,并且您已安装 Python!

Have you tried this script /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" on the homepage .您是否在主页上尝试过此脚本/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

And then you can do brew install python@3.8 or brew install python .然后你可以做brew install python@3.8brew install python

Homebrew is an OSS software with codebase available in github, feel free to do the security checks and submit the hackerone reports . Homebrew 是一个 OSS 软件,代码库在 github,请随时进行安全检查并提交hackerone报告

Happy to answer any specific question.很高兴回答任何具体问题。

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

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