【发布时间】:2019-03-01 00:47:50
【问题描述】:
你好最近几天我正在尝试运行一个脚本来创建用于机器学习的模态。但我无法在 Pycharm 编辑器中安装 Turicreate 包。
我按照这些步骤运行脚本。
- 在此链接中下载 Python 3.7:
(https://www.python.org/downloads/) - 下载 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