Python解释器下载的官方地址:https://www.python.org/
https://www.python.org/downloads/release/python-3110/
下载后一直安装 下一步
安装路径 为
/Library/Frameworks/Python.framework/Versions/3.11
解释器位置
python解释器 所有相关文件
在bin目录下 有一个 python3.11的文件 这个文件就是python 解释器的启动文件
系统环境变量
默认添加到了环境变量中了
环境变量 /Users/rrhj/.bash_profile 或者 /Users/rrhj/.zprofile 文件
#Flutter 环境变量export FLUTTER=~/opt/flutter/bin#flutter镜像设置export PUB_HOSTED_URL=https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn#安卓export ANDROID_HOME=/Users/rrhj/Library/Android/sdk #安卓模拟器export PATH=${PATH}:${ANDROID_HOME}/emulator#安卓tool工具export PATH=${PATH}:${ANDROID_HOME}/tools#安卓平台工具export PATH=${PATH}:${ANDROID_HOME}/platform-tools#ffmpeg目录export PATH=/usr/local/ffmpeg/bin:$PATHexport PATH=${PATH}:${FLUTTER}# HomeBrewexport HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottlesexport PATH="/usr/local/bin:$PATH"export PATH="/usr/local/sbin:$PATH"# HomeBrew END#python3export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3source /usr/local/bin/virtualenvwrapper.sh# Setting PATH for Python 3.11# The original version is saved in .bash_profile.pysavePATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}"export PATH
同时由于 输入 python3.11 /Users/rrhj/Desktop/hello.py python3.11 不方便
所以修改 /Library/Frameworks/Python.framework/Versions/3.11 里面bin里面的 python3.11 改为python 如下
网友评论