Python 3.5安装JPype
使用命令pip install jpype1
可安装jpype。
如果出现如下情况:
creating build\lib.win-amd64-3.5\jpypex
copying jpypex\__init__.py -> build\lib.win-amd64-3.5\jpypex
creating build\lib.win-amd64-3.5\jpypex\swing
copying jpypex\swing\AbstractAction.py -> build\lib.win-amd64-3.5\jpypex\swing
copying jpypex\swing\pyutils.py -> build\lib.win-amd64-3.5\jpypex\swing
copying jpypex\swing\__init__.py -> build\lib.win-amd64-3.5\jpypex\swing
running build_ext
building '_jpype' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command "c:\users\xyb-c308\appdata\local\programs\python\python35\python.exe -u
-c "import setuptools, tokenize;__file__='C:\\Users\\xyb-C308\\AppData\\Local\\T
emp\\pip-build-cnhdb_jq\\jpype1\\setup.py';f=getattr(tokenize, 'open', open)(__f
ile__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__
, 'exec'))" install --record C:\Users\xyb-C308\AppData\Local\Temp\pip-h1e28641-r
ecord\install-record.txt --single-version-externally-managed --compile" failed w
ith error code 1 in C:\Users\xyb-C308\AppData\Local\Temp\pip-build-cnhdb_jq\jpyp
e1\
说明没有安装visual C++编译器。
从 http://landinghub.visualstudio.com/visual-cpp-build-tools 这个网址上下载安装Visual C++ Build Tools 2015。再执行pip install jpype1
就能完成jpype的安装。