Python 3.7 在 Mac OS 10.14.2 上安装 JPype1 时出错
Error in installing JPype1 in Python 3.7 on Mac OS 10.14.2
我在系统中安装 JPype1 时遇到错误。我正在使用 Python 3.7。需要 JPype1 作为 Jaydebeapi 的依赖项。
pip install Jpype1
错误信息如下:
收集jpype1
使用缓存
https://files.pythonhosted.org/packages/c4/4b/60a3e63d51714d4d7ef1b1efdf84315d118a0a80a5b085bb52a7e2428cdc/JPype1-0.6.3.tar.gz
为收集的包构建轮子:jpype1
运行 setup.py bdist_wheel for jpype1 ...错误
命令 /Users/citius/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/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/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-wheel-swsvni4l --python-tag cp36 的完整输出:
运行 bdist_wheel
运行 构建
运行 build_py
创建构建
创建 build/lib.macosx-10.7-x86_64-3.6
创建 build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jcollection.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_classpath.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_pykeywords.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jproxy.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_gui.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_darwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/nio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_cygwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_properties.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_refdaemon.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jboxed.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/JClassUtil.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jvmfinder.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/imports.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_core.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_linux.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jarray.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jobject.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jclass.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_windows.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jwrapper.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jexception.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/reflect.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jpackage.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt
复制 jpype/awt/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt
创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt/事件
复制 jpype/awt/event/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event
复制 jpype/awt/event/WindowAdapter.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event
创建 build/lib.macosx-10.7-x86_64-3.6/jpypex
复制 jpypex/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex
创建 build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
复制 jpypex/swing/AbstractAction.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
复制 jpypex/swing/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
复制 jpypex/swing/pyutils.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
运行 build_ext
/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/setup.py:173: FeatureNotice: 打开 Numpy 支持快速 Java 数组访问
功能通知)
构建“_jpype”扩展
创建 build/temp.macosx-10.7-x86_64-3.6
创建 build/temp.macosx-10.7-x86_64-3.6/native
创建 build/temp.macosx-10.7-x86_64-3.6/native/python
创建 build/temp.macosx-10.7-x86_64-3.6/native/common
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/citius/anaconda3/include -arch x86_64 -I/Users/citius/anaconda3/include -arch x86_64 -DMACOSX=1 -DHAVE_NUMPY=1 -Inative/common/include -Inative/python/include -Inative/jni_include -I/Users/citius/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/citius/anaconda3/include/python3.6m -c native/python/jpype_python.cpp -o build/temp.macosx-10.7-x86_64-3.6/native/python/jpype_python.o -ggdb
在 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0 包含的文件中,
来自 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,
从 /Users/citius/anaconda3/include/python3.6m/Python.h:11,
来自 native/python/include/jpype_python.h:23,
来自 native/python/jpype_python.cpp:19:
/Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: 致命错误: limits.h: 没有那个文件或目录
#include_next /* 递归到真实的 */
^
编译终止。
错误:命令 'gcc' 失败,退出状态为 1
--------------------------------------
jpype1 的构建轮失败
运行 setup.py 为 jpype1 清理
构建 jpype1 失败
安装收集的包:jpype1
运行 setup.py 安装 jpype1 ... 错误
命令 /Users/citius/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/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/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-record-3pg5yd08/install-record.txt --single-version-externally-managed --compile 的完整输出:
运行 安装
运行 构建
运行 build_py
创建构建
创建 build/lib.macosx-10.7-x86_64-3.6
创建 build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jcollection.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_classpath.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_pykeywords.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jproxy.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_gui.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_darwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/nio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_cygwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_properties.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_refdaemon.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jboxed.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/JClassUtil.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jvmfinder.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/imports.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_core.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_linux.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jarray.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jobject.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jclass.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_windows.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jwrapper.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jexception.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/reflect.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
复制 jpype/_jpackage.py -> build/lib.macosx-10.7-x86_64-3.6/jpype
创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt
复制 jpype/awt/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt
创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt/事件
复制 jpype/awt/event/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event
复制 jpype/awt/event/WindowAdapter.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event
创建 build/lib.macosx-10.7-x86_64-3.6/jpypex
复制 jpypex/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex
创建 build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
复制 jpypex/swing/AbstractAction.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
复制 jpypex/swing/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
复制 jpypex/swing/pyutils.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing
运行 build_ext
/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/setup.py:173: FeatureNotice: 打开 Numpy 支持快速 Java 数组访问
功能通知)
构建“_jpype”扩展
创建 build/temp.macosx-10.7-x86_64-3.6
创建 build/temp.macosx-10.7-x86_64-3.6/native
创建 build/temp.macosx-10.7-x86_64-3.6/native/python
创建 build/temp.macosx-10.7-x86_64-3.6/native/common
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/citius/anaconda3/include -arch x86_64 -I/Users/citius/anaconda3/include -arch x86_64 -DMACOSX=1 -DHAVE_NUMPY=1 -Inative/common/include -Inative/python/include -Inative/jni_include -I/Users/citius/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/citius/anaconda3/include/python3.6m -c native/python/jpype_python.cpp -o build/temp.macosx-10.7-x86_64-3.6/native/python/jpype_python.o -ggdb
在 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0 包含的文件中,
来自 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,
从 /Users/citius/anaconda3/include/python3.6m/Python.h:11,
来自 native/python/include/jpype_python.h:23,
来自 native/python/jpype_python.cpp:19:
/Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: 致命错误: limits.h: 没有那个文件或目录
#include_next /* 递归到真实的 */
^
编译终止。
错误:命令 'gcc' 失败,退出状态为 1
--------------------------------------
命令“/Users/citius/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/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/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-record-3pg5yd08/install-record.txt --single-version-externally-managed --compile”失败,错误代码为 1 in /private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/
首先使用conda安装gcc
conda install gcc
然后使用二进制安装jpype1。从 conda-forge 软件频道安装它。
conda install -c conda-forge jpype1
它对我有用。
它也适用于 Python2.7
对于 Amazon Linux 或其他基于 RedHat 的:
dnf install redhat-rpm-config gcc-c++ python3-devel unixODBC-devel
我在系统中安装 JPype1 时遇到错误。我正在使用 Python 3.7。需要 JPype1 作为 Jaydebeapi 的依赖项。
pip install Jpype1
错误信息如下:
收集jpype1 使用缓存 https://files.pythonhosted.org/packages/c4/4b/60a3e63d51714d4d7ef1b1efdf84315d118a0a80a5b085bb52a7e2428cdc/JPype1-0.6.3.tar.gz 为收集的包构建轮子:jpype1 运行 setup.py bdist_wheel for jpype1 ...错误 命令 /Users/citius/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/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/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-wheel-swsvni4l --python-tag cp36 的完整输出: 运行 bdist_wheel 运行 构建 运行 build_py 创建构建 创建 build/lib.macosx-10.7-x86_64-3.6 创建 build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jcollection.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_classpath.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_pykeywords.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jproxy.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_gui.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_darwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/nio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_cygwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_properties.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_refdaemon.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jboxed.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/JClassUtil.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jvmfinder.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/imports.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_core.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_linux.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jarray.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jobject.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jclass.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_windows.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jwrapper.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jexception.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/reflect.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jpackage.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt 复制 jpype/awt/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt 创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt/事件 复制 jpype/awt/event/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event 复制 jpype/awt/event/WindowAdapter.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event 创建 build/lib.macosx-10.7-x86_64-3.6/jpypex 复制 jpypex/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex 创建 build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 复制 jpypex/swing/AbstractAction.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 复制 jpypex/swing/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 复制 jpypex/swing/pyutils.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 运行 build_ext /private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/setup.py:173: FeatureNotice: 打开 Numpy 支持快速 Java 数组访问 功能通知) 构建“_jpype”扩展 创建 build/temp.macosx-10.7-x86_64-3.6 创建 build/temp.macosx-10.7-x86_64-3.6/native 创建 build/temp.macosx-10.7-x86_64-3.6/native/python 创建 build/temp.macosx-10.7-x86_64-3.6/native/common gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/citius/anaconda3/include -arch x86_64 -I/Users/citius/anaconda3/include -arch x86_64 -DMACOSX=1 -DHAVE_NUMPY=1 -Inative/common/include -Inative/python/include -Inative/jni_include -I/Users/citius/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/citius/anaconda3/include/python3.6m -c native/python/jpype_python.cpp -o build/temp.macosx-10.7-x86_64-3.6/native/python/jpype_python.o -ggdb 在 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0 包含的文件中, 来自 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34, 从 /Users/citius/anaconda3/include/python3.6m/Python.h:11, 来自 native/python/include/jpype_python.h:23, 来自 native/python/jpype_python.cpp:19: /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: 致命错误: limits.h: 没有那个文件或目录 #include_next /* 递归到真实的 */ ^ 编译终止。 错误:命令 'gcc' 失败,退出状态为 1 -------------------------------------- jpype1 的构建轮失败 运行 setup.py 为 jpype1 清理 构建 jpype1 失败 安装收集的包:jpype1 运行 setup.py 安装 jpype1 ... 错误 命令 /Users/citius/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/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/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-record-3pg5yd08/install-record.txt --single-version-externally-managed --compile 的完整输出: 运行 安装 运行 构建 运行 build_py 创建构建 创建 build/lib.macosx-10.7-x86_64-3.6 创建 build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jcollection.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_classpath.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_pykeywords.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jproxy.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_gui.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_darwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/nio.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_cygwin.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_properties.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_refdaemon.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jboxed.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/JClassUtil.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jvmfinder.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/imports.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_core.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_linux.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jarray.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jobject.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jclass.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_windows.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jwrapper.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jexception.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/reflect.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 复制 jpype/_jpackage.py -> build/lib.macosx-10.7-x86_64-3.6/jpype 创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt 复制 jpype/awt/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt 创建 build/lib.macosx-10.7-x86_64-3.6/jpype/awt/事件 复制 jpype/awt/event/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event 复制 jpype/awt/event/WindowAdapter.py -> build/lib.macosx-10.7-x86_64-3.6/jpype/awt/event 创建 build/lib.macosx-10.7-x86_64-3.6/jpypex 复制 jpypex/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex 创建 build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 复制 jpypex/swing/AbstractAction.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 复制 jpypex/swing/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 复制 jpypex/swing/pyutils.py -> build/lib.macosx-10.7-x86_64-3.6/jpypex/swing 运行 build_ext /private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/setup.py:173: FeatureNotice: 打开 Numpy 支持快速 Java 数组访问 功能通知) 构建“_jpype”扩展 创建 build/temp.macosx-10.7-x86_64-3.6 创建 build/temp.macosx-10.7-x86_64-3.6/native 创建 build/temp.macosx-10.7-x86_64-3.6/native/python 创建 build/temp.macosx-10.7-x86_64-3.6/native/common gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/citius/anaconda3/include -arch x86_64 -I/Users/citius/anaconda3/include -arch x86_64 -DMACOSX=1 -DHAVE_NUMPY=1 -Inative/common/include -Inative/python/include -Inative/jni_include -I/Users/citius/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/citius/anaconda3/include/python3.6m -c native/python/jpype_python.cpp -o build/temp.macosx-10.7-x86_64-3.6/native/python/jpype_python.o -ggdb 在 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0 包含的文件中, 来自 /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34, 从 /Users/citius/anaconda3/include/python3.6m/Python.h:11, 来自 native/python/include/jpype_python.h:23, 来自 native/python/jpype_python.cpp:19: /Users/citius/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: 致命错误: limits.h: 没有那个文件或目录 #include_next /* 递归到真实的 */ ^ 编译终止。 错误:命令 'gcc' 失败,退出状态为 1 -------------------------------------- 命令“/Users/citius/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/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/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-record-3pg5yd08/install-record.txt --single-version-externally-managed --compile”失败,错误代码为 1 in /private/var/folders/kw/ykkdj1vn7qj_2hms02xmtz6h0000gn/T/pip-install-1rreficl/jpype1/
首先使用conda安装gcc
conda install gcc
然后使用二进制安装jpype1。从 conda-forge 软件频道安装它。
conda install -c conda-forge jpype1
它对我有用。
它也适用于 Python2.7
对于 Amazon Linux 或其他基于 RedHat 的:
dnf install redhat-rpm-config gcc-c++ python3-devel unixODBC-devel