【问题标题】:Not able to install turicreate in PyCharm mac OS 10.13 [duplicate]无法在 PyCharm mac OS 10.13 中安装 turicreate [重复]
【发布时间】:2019-03-01 00:47:50
【问题描述】:

你好最近几天我正在尝试运行一个脚本来创建用于机器学习的模态。但我无法在 Pycharm 编辑器中安装 Turicreate 包。

我按照这些步骤运行脚本。

  1. 在此链接中下载 Python 3.7:
    (https://www.python.org/downloads/)
  2. 下载 Pycharm 编辑器(https://www.jetbrains.com/pycharm/)

之后,我在最新的 python3.7 中设置项目解释器并尝试安装 turicreate 但总是出错。


收集 turicreate 使用缓存的https://files.pythonhosted.org/packages/db/54/167837569bcb816b3fe68f003f18d07ab9d5ac31b2b12b8f9b07b1ccc7a4/turicreate-4.2.tar.gz 为收集的包裹建造轮子:turicreate 为 turicreate 运行 setup.py bdist_wheel:已启动 为 turicreate 运行 setup.py bdist_wheel:完成状态为“错误” 命令的完整输出 /Users/tikam/MLTikam1/venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm -packaging1/turicreate/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pip -wheel-qez5g2v_ --python-tag cp37: 运行 bdist_wheel 运行构建 安装到 build/bdist.macosx-10.9-x86_64/wheel 运行安装

      ==================================================================================
      ERROR

      If you see this message, pip install did not find an available binary package
      for your system. Supported platforms are:

      * Linux x86_64 (including WSL on Windows 10).
      * macOS 10.12+ x86_64.
      * Python 2.7, 3.5, or 3.6.

      Other possible causes of this error are:

      * Outdated pip version (try `pip install -U pip`).

      ==================================================================================

为 turicreate 运行 setup.py clean 构建 turicreate 失败 安装收集的包:turicreate 为 turicreate 运行 setup.py install: 开始 为 turicreate 运行 setup.py install:完成状态为“错误” 命令的完整输出 /Users/tikam/MLTikam1/venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm -packaging1/turicreate/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/ pip-record-kjt0p8as/install-record.txt --single-version-externally-managed --compile --install-headers /Users/tikam/MLTikam1/venv/include/site/python3.7/turicreate: 运行安装

        ==================================================================================
        ERROR

        If you see this message, pip install did not find an available binary package
        for your system. Supported platforms are:

        * Linux x86_64 (including WSL on Windows 10).
        * macOS 10.12+ x86_64.
        * Python 2.7, 3.5, or 3.6.

        Other possible causes of this error are:

        * Outdated pip version (try `pip install -U pip`).

        ==================================================================================



----------------------------------------

turicreate 的构建轮子失败 命令 "/Users/tikam/MLTikam1/venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm-packaging1 /turicreate/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\ n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pip- record-kjt0p8as/install-record.txt --single-version-externally-managed --compile --install-headers /Users/tikam/MLTikam1/venv/include/site/python3.7/turicreate" 失败,错误代码为 1在 /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm-packaging1/turicreate/


请建议我需要执行哪些步骤来安装 turicreat 包。

我想运行这个脚本:

脚本**************

import turicreate as tc

data = tc.SFrame('photoLabel.sframe')
model = tc.image_classifier.create(data, target='photoLabel')
predictions = model.predict(data)
model.export_coreml('MyClassifier.mlmodel')

【问题讨论】:

  • 在我的 python 3.6 - mac 上成功安装它。正如它所说,3.6 似乎是它目前支持的最新版本。
  • 错误信息说它只支持 Python 3.5 和 3.6,不支持 3.7。所以如果你真的需要使用这个库,你需要将你的 Python 降级到 3.6.x 版本
  • @Hapalop 谢谢,我在 3.7 版本上花了太多时间

标签: python pycharm installation python-3.7


【解决方案1】:

目前不支持 Python 3.7。所以你必须回到之前的 Python 版本。

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

来源:https://github.com/apple/turicreate/issues/788

或者你可以创建虚拟环境来运行 turicreate

从官网下载Python3.6 tgz文件(如Python-3.6.6.tgz)

Unpack it with tar -xvzf Python-3.6.6.tgz
cd Python-3.6.6
run ./configure
run make altinstall to install it 

(安装 vs altinstall 解释在这里Difference in details between "make install" and "make altinstall") 您通常会在/usr/local/bin 下找到新的python 安装。现在您可以创建一个新的 virtualenv 指定 python 版本: virtualenv --python=python3.6 env3.6 运行命令source env3.6/source/bin/activate 进入virtualenv。 使用经典的pip install turicreate 安装 turicreate

来源:https://github.com/tensorflow/tensorflow/issues/17022

【讨论】:

    猜你喜欢
    • 2019-08-03
    • 2018-11-27
    • 2019-11-25
    • 2018-10-19
    • 2018-03-30
    • 2018-10-31
    • 2020-01-23
    • 2017-03-11
    • 2018-12-20
    相关资源
    最近更新 更多