python3.7.2怎么安装和管理扩展包,安装Python3.7.2之后,usr/bin只有python2.7

现在,MacOSX预装了python2,他们把它放在/usr/local/bin中,就可以使用它了,而这个位置已经在系统路径中。在

如果安装任何新版本,如Python3+,它将安装在/Library/Frameworks/Python.framework/Versions//bin/上。在

例如,在我的例子中,完整路径是/Library/Frameworks/Python.framework/Versions/3.6/bin/python3&/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6。在

我已经用自制软件安装了Python3.6。在

以下是我的终端的有用日志。请看一下。在» Versions check with path (which python)Rishikeshs-MacBook-Air:~ hygull$ which python

/usr/local/bin/python

Rishikeshs-MacBook-Air:~ hygull$which python3

^{pr2}$

which python3.6Rishikeshs-MacBook-Air:~ hygull$ which python3.6

/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6

Rishikeshs-MacBook-Air:~ hygull$» Start & exit (python2, default installation on MAC OS X)

pythonRishikeshs-MacBook-Air:~ hygull$ python

Python 2.7.15 (default, Jan 12 2019, 21:07:57)

[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>>

>>> exit()

Rishikeshs-MacBook-Air:~ hygull$python3Rishikeshs-MacBook-Air:~ hygull$ python3

Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>>

>>> exit()

Rishikeshs-MacBook-Air:~ hygull$python3.6

(Same as above but useful if you have two python3+, e.g. if you have python3.6 & python3.7 installed & you want to work with python3.6)Rishikeshs-MacBook-Air:~ hygull$ python3.6

Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值