我应该使用 Windows 还是 Mac 参加 Python CS 课程?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1878904/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:34:12  来源:igfitidea点击:

Should I take a Python CS class using Windows or Mac?

pythonwindowsmacoscompatibility

提问by Chris Long

I'll be taking a Python-based computer science class next semester using my MacBook Pro. It will be centered around a custom-designed packagefor this class. The problem is that this package is being sponsored by Microsoft Research, so it was obviously designed with Windows in mind. Supposedly, it runs on Mac OS and Linux too, but they say they don't officially support Snow Leopard whatsoever.

下学期我将使用我的 MacBook Pro 参加基于 Python 的计算机科学课程。它将围绕此类的定制设计为中心。问题是这个包是由微软研究院赞助的,所以它显然是为 Windows 设计的。据说它也可以在 Mac OS 和 Linux 上运行,但他们说他们不正式支持 Snow Leopard。

My concern is that there will be some sort of miniscule differences between the Python code on a Mac and on a PC. The homework is submitted online, and is graded for results. Apparently, they don't actually look at the code itself.

我担心的是,Mac 和 PC 上的 Python 代码之间会存在某种微小的差异。作业在线提交,并根据结果进行评分。显然,他们实际上并不看代码本身。

Is this a concern? Should I install Windows in a VM/partition and be done with it? Or should I stay where I feel most comfortable? After all, switching back and forth constantly would be a huge hassle. Thanks for your help!

这是一个问题吗?我应该在 VM/分区中安装 Windows 并完成它吗?还是应该待在我觉得最舒服的地方?毕竟,不断地来回切换将是一个巨大的麻烦。谢谢你的帮助!

回答by Andrew Hare

If the class expects the code to run on Windows then I would install a VM with Windows on it since it is possible that some things may not work quite the same way (especially if you are doing system-specific things like file-system access or executing OS commands).

如果课程希望代码在 Windows 上运行,那么我会在其上安装一个带有 Windows 的 VM,因为有些事情可能不会以完全相同的方式工作(特别是如果您正在执行特定于系统的事情,例如文件系统访问或执行操作系统命令)。

Classwork/homework always goes smoother when you have the exactsame environment as the professor and the rest of the class.

当你有课堂作业/功课总是去平滑精确的相同的环境中教授和班上的其他同学。

回答by jakeboxer

Definitely start with Mac. If it turns out that it really does need Windows, you can switch once you're sure. But Python development is definitely more natural on a Unix-based machine.

绝对从Mac开始。如果事实证明它确实需要 Windows,您可以在确定后切换。但是 Python 开发在基于 Unix 的机器上肯定更自然。

Most online graders will let you submit multiple times, and the first assignment is usually easy, so you should know pretty quickly if using a Mac is causing you problems. In the meantime though, you'll have a much smoother ride doing Python on a Mac than on Windows.

大多数在线评分者会让你多次提交,而且第一次作业通常很容易,所以你应该很快知道使用 Mac 是否给你带来了问题。与此同时,在 Mac 上使用 Python 会比在 Windows 上更顺畅。

回答by Mark Pitchless

If they will be testing your code on windows then you really need to be targeting that platform. However if you feel more comfortable on the Mac, do your dev there but also run a virtual win machine so you can test on the target platform. I would suggest the excellent VirtualBox. You can share local folders with the VM, which reduces the pain of switching back and forth, once the VM has python setup you can just hop in and and run the code direct from the directory on the Mac you developed in.

如果他们将在 Windows 上测试您的代码,那么您确实需要针对该平台。但是,如果您在 Mac 上感觉更舒服,请在那里进行开发,同时运行虚拟机,以便您可以在目标平台上进行测试。我会推荐优秀的VirtualBox。您可以与 VM 共享本地文件夹,这减少了来回切换的痛苦,一旦 VM 设置了 python,您就可以直接从您开发的 Mac 上的目录中跳入并运行代码。

回答by Alex Martelli

From their siteit looks like Mac is fully supported (up to 10.5 -- it's true that 10.6 is different enough to give occasional problems... I haven't upgraded yet even though I did buy a family pack of 10.5 to 10.6 upgrades, as I'm not looking for trouble right now). If you can use a Macbook with 10.5, I'd say to go for it -- the familiarity and extra productivity are worth the miniscule risk that despite all their claims of support something goes wrong (and you can in fact download and start testing right now!). If your Mac options are limited to 10.6, then I'd go for a VMWare or Parallels VM with a Windows (not sure if Windows 7 is fully supported yet, maybe XP is a more prudent option) installation instead.

他们的网站看来,Mac 是完全支持的(最高 10.5——确实 10.6 的不同足以偶尔出现问题......我还没有升级,尽管我确实购买了 10.5 到 10.6 升级的家庭包,因为我现在不是在找麻烦)。如果你可以使用 10.5 的 Macbook,我会说去吧——熟悉和额外的生产力值得冒微不足道的风险,尽管他们声称支持有些问题(实际上你可以下载并开始测试)现在!)。如果您的 Mac 选项仅限于 10.6,那么我会选择带有 Windows(不确定是否完全支持 Windows 7,也许 XP 是一个更谨慎的选择)安装的 VMWare 或 Parallels VM。

回答by Michael Aaron Safyan

Develop and test on a Mac. If it works on the Mac, then test it on Windows before submitting. Done this tons of times with my own programming courses, albeit with a different set of languages and technologies.

在 Mac 上开发和测试。如果它在 Mac 上工作,那么在提交之前在 Windows 上测试它。用我自己的编程课程完成了很多次,尽管使用了不同的语言和技术。

回答by Escualo

Go Mac and never go back.

去 Mac,永不回头。

More seriously, a Mac offers UNIX environment, and Windows offers blue screens.

更严重的是,Mac 提供 UNIX 环境,Windows 提供蓝屏。