热线电话:13121318867

登录
2019-01-22 阅读量: 874
我想让命令python3运行python3.7

我目前正在使用Mac OS Mojave版本10.14.2我刚刚安装了python3.7并卸载了python3.6。然后,发生以下结果

$ python3

-bash: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3: No such file or directory

$ which python3

-bash: type: python3: not found

$ which python3.7

python3.7 is /usr/local/bin/python3.7

################

目前想到的一个解决办法:

检查出哪里python3是

which python3

然后使用该输出的返回来查看它当前指向的内容

ls -la $(which python3)

用python3正确的替换错误的软链接python3.7

ln -sf $(which python3.7) /usr/local/bin/python3

测试版本

python3 --version

在将来,检查,pyenv因为它将使安装新版本的python和更容易在版本之间切换

0.0000
2
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子