python3.7安装教程mac_在Mac上同时安装Python3.6和Python3.7

1586010002-jmsa.png

I'm trying to install tensorflow onto a Mac with Python3.7. However, I'm getting the error:

$ pip3 -v install tensorflow

...

Skipping link https://files.pythonhosted.org/packages/56/7a/c6bca0fe52a94ca508731d8b139e7dbd5a36cddc64c19f422f97e5a853e8/tensorflow-1.10.0rc1-cp36-cp36m-win_amd64.whl#sha256=3ab24374888d6a13d55ce2e3cf4ba0c9cd6f824723313db5322512087525cb78 (from https://pypi.org/simple/tensorflow/); it is not compatible with this Python

Could not find a version that satisfies the requirement tensorflow (from versions: )

Cleaning up...

Removed build tracker '/private/var/folders/4n/9342s4wd3jv0qzwjz8rxrygr0000gp/T/pip-req-tracker-3p60r2lo'

No matching distribution found for tensorflow

From what I can gather this is happening because tensorflow doesn't yet support Python3.7. As a workaround I want to install Python3.6 alongside 3.7 and then install tensorflow to that version. However, I'm new to Mac and not sure of the correct way to do this without potentially messing with the preexisting Python version.

I've tried using brew, but it looks like Python3 is as specific as it gets. What is the correct way to do what I'm after?

解决方案

Try using brew for example if already using Python 3:

$ brew unlink python

$ brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb

To get back to python 3.7.4_1 use:

$ brew switch python 3.7.4_1

And if need 3.6 again switch with:

$ brew switch python 3.6.5_1

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值