mac怎么使用python
发布时间:2020年11月04日 02:09:20
来源:环球青藤
点击量:1208
【摘要】mac怎么使用python?在mac上搭建python环境:mac系统其实自带了一个python的执行执行环境,用来运行python还行,但是开发可能就不够了,因

mac怎么使用python?
在mac上搭建python环境:mac系统其实自带了一个python的执行执行环境,用来运行python还行,但是开发可能就不够了,因此我们需要重新安装python。
推荐:《Python教程》
这里有两种方案安装:1.homebreWbrew install python,这个方案比较简单,如果出错的话可以给前面加sudo试试,这个安装的python可能不是最新版。
从官网下载安装,大家可以从https://www.python.org/download下载安装最新版的python,安装比较无脑,一路按下去就OK,缺点是以后升级,卸载都得自己维护。
这两个方法安装的python的位置是不一样的,大家可以用:which python,来查看安装位置.安装完成后在终端中键入python来验证安装是否成功。
终端执行:cd 到文件夹目录,在文件首行添加#!/usr/bin/env python,添加权限 chmod 777 filename.py,执行脚本./filename.py,简单脚本:files.py。
以上就是小编分享的关于mac怎么使用python的详细内容希望对大家有所帮助,更多有关python教程请关注环球青藤其它相关文章!
上一篇:怎么查看python版本?
下一篇:python的注释符是什么
就业培训申请领取


环球青藤
官方QQ群扫描上方二维码或点击一键加群,免费领取大礼包,加群暗号:青藤。 一键加群
最新文章
Python编程各地入口
环球青藤官方微信服务平台


刷题看课 APP下载
免费直播 一键购课
代报名等人工服务
Python编程热点排行