我正在尝试在 Windows 上使用 pip安装jep 。它给了我以下错误:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
看来我们需要 c 编译器来安装这个 jep。我没有在 Windows 上安装 c 编译器。所以我试图在cygwin上安装它。但是在 cygwin 上安装它也会给我以下问题:
$ pip3 install jep
Collecting jep
Using cached https://files.pythonhosted.org/packages/3e/0c/d78776bc56fcef175470c3a7081361cffedd10ca3e8fff9ebdb2c51f9e7e/jep-3.8.2.tar.gz
Building wheels for collected packages: jep
Running setup.py bdist_wheel for jep ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2lilr_ba/jep/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 /tmp/tmpimho8uljpip-wheel
- --python-tag cp36:
numpy include found at /usr/lib/python3.6/site-packages/numpy/core/include
running bdist_wheel
running build
running setup_java
Using JAVA_HOME: D:\Mahesh\Programs\jdk1.8.0_74
running build_java
D:\Mahesh\Programs\jdk1.8.0_74/bin/javac -deprecation -d build/java -classpath src src/main/java/jep/AbstractNDArray.java src/main/java/jep/ClassEnquirer.java src/main/java/jep/ClassList.java src/main/java/jep/DirectNDArray.java src/main/java/jep/Jep.java src/main/java/jep/JepConfig.java src/main
/java/jep/JepException.java src/main/java/jep/JepScriptEngine.java src/main/java/jep/JepScriptEngineFactory.java src/main/java/jep/LibraryLocator.java src/main/java/jep/MainInterpreter.java src/main/java/jep/NamingConventionClassEnquirer.java src/main/java/jep/NDArray.java src/main/java/jep/Proxy.ja
va src/main/java/jep/PyConfig.java src/main/java/jep/Run.java src/main/java/jep/SharedInterpreter.java src/main/java/jep/Util.java src/main/java/jep/python/InvocationHandler.java src/main/java/jep/python/MemoryManager.java src/main/java/jep/python/PyCallable.java src/main/java/jep/python/PyClass.jav
a src/main/java/jep/python/PyModule.java src/main/java/jep/python/PyObject.java src/main/java/jep/python/PyPointer.java
\Mahesh\Programs\jdk1.8.0_74/bin/javah -classpath build/java -d build/include jep.Jep jep.MainInterpreter jep.python.InvocationHandler jep.python.PyObject jep.python.PyCallable jep.python.PyPointer
D:\Mahesh\Programs\jdk1.8.0_74/bin/javac -deprecation -d build/java/test -classpath build/java:src src/test/java/jep/test/Test.java src/test/java/jep/test/TestCompiledScript.java src/test/java/jep/test/TestDefaultMethods.java src/test/java/jep/test/TestExceptionCause.java src/test/java/jep/test/T
estGetByteArray.java src/test/java/jep/test/TestGetCollectionBoxing.java src/test/java/jep/test/TestGetJPyObject.java src/test/java/jep/test/TestGetTempValue.java src/test/java/jep/test/TestGetWithClass.java src/test/java/jep/test/TestInvoke.java src/test/java/jep/test/TestOverload.java src/test/jav
a/jep/test/TestPreInitVariables.java src/test/java/jep/test/TestSharedArgv.java src/test/java/jep/test/TestSharedInterpreter.java src/test/java/jep/test/TestSharedModules.java src/test/java/jep/test/TestSharedModulesThreads.java src/test/java/jep/test/closeable/TestAutoCloseable.java src/test/java/j
ep/test/numpy/TestNumpy.java src/test/java/jep/test/numpy/TestNumpyArrayToString.java src/test/java/jep/test/numpy/TestNumpyProdShared.java src/test/java/jep/test/numpy/example/TestNumpyGILFreeze.java src/test/java/jep/test/numpy/example/TestNumpyMemoryLeak.java src/test/java/jep/test/numpy/example/
TestNumpyProdLost.java src/test/java/jep/test/numpy/example/TestScipyFreeze.java src/test/java/jep/test/synchronization/TestCrossLangSync.java src/test/java/jep/test/types/TestFieldTypes.java src/test/java/jep/test/types/TestMethodTypes.java src/test/java/jep/test/types/TestStaticFieldTypes.java src
/test/java/jep/test/types/TestStaticMethodTypes.java
src\test\java\jep\test\Test.java:8: error: cannot find symbol
import jep.Jep;
^
symbol: class Jep
location: package jep
src\test\java\jep\test\Test.java:9: error: cannot find symbol
import jep.JepConfig;
^
symbol: class JepConfig
location: package jep
src\test\java\jep\test\Test.java:10: error: cannot find symbol
import jep.JepException;
^
symbol: class JepException
location: package jep
src\test\java\jep\test\Test.java:21: error: cannot find symbol
private Jep jep = null;
^
:
:
symbol: class NDArray
location: class TestNumpy
src\test\java\jep\test\numpy\TestNumpy.java:170: error: cannot find symbol
public NDArray<int[]> testArgAndReturn(NDArray<int[]> array) {
^
symbol: class NDArray
location: class TestNumpy
100 errors
error: command 'D:\\Mahesh\\Programs\\jdk1.8.0_74/bin/javac' failed with exit status 1
----------------------------------------
Failed building wheel for jep
Running setup.py clean for jep
Failed to build jep
Installing collected packages: jep
Running setup.py install for jep ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2lilr_ba/jep/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-nehom1yp-rec
ord/install-record.txt --single-version-externally-managed --compile:
numpy include found at /usr/lib/python3.6/site-packages/numpy/core/include
running install
running build
running setup_java
Using JAVA_HOME: D:\Mahesh\Programs\jdk1.8.0_74
running build_java
D:\Mahesh\Programs\jdk1.8.0_74/bin/javac -deprecation -d build/java -classpath src src/main/java/jep/AbstractNDArray.java src/main/java/jep/ClassEnquirer.java src/main/java/jep/ClassList.java src/main/java/jep/DirectNDArray.java src/main/java/jep/Jep.java src/main/java/jep/JepConfig.java src/ma
in/java/jep/JepException.java src/main/java/jep/JepScriptEngine.java src/main/java/jep/JepScriptEngineFactory.java src/main/java/jep/LibraryLocator.java src/main/java/jep/MainInterpreter.java src/main/java/jep/NamingConventionClassEnquirer.java src/main/java/jep/NDArray.java src/main/java/jep/Proxy.
java src/main/java/jep/PyConfig.java src/main/java/jep/Run.java src/main/java/jep/SharedInterpreter.java src/main/java/jep/Util.java src/main/java/jep/python/InvocationHandler.java src/main/java/jep/python/MemoryManager.java src/main/java/jep/python/PyCallable.java src/main/java/jep/python/PyClass.j
ava src/main/java/jep/python/PyModule.java src/main/java/jep/python/PyObject.java src/main/java/jep/python/PyPointer.java
\Mahesh\Programs\jdk1.8.0_74/bin/javah -classpath build/java -d build/include jep.Jep jep.MainInterpreter jep.python.InvocationHandler jep.python.PyObject jep.python.PyCallable jep.python.PyPointer
D:\Mahesh\Programs\jdk1.8.0_74/bin/javac -deprecation -d build/java/test -classpath build/java:src src/test/java/jep/test/Test.java src/test/java/jep/test/TestCompiledScript.java src/test/java/jep/test/TestDefaultMethods.java src/test/java/jep/test/TestExceptionCause.java src/test/java/jep/test
/TestGetByteArray.java src/test/java/jep/test/TestGetCollectionBoxing.java src/test/java/jep/test/TestGetJPyObject.java src/test/java/jep/test/TestGetTempValue.java src/test/java/jep/test/TestGetWithClass.java src/test/java/jep/test/TestInvoke.java src/test/java/jep/test/TestOverload.java src/test/j
ava/jep/test/TestPreInitVariables.java src/test/java/jep/test/TestSharedArgv.java src/test/java/jep/test/TestSharedInterpreter.java src/test/java/jep/test/TestSharedModules.java src/test/java/jep/test/TestSharedModulesThreads.java src/test/java/jep/test/closeable/TestAutoCloseable.java src/test/java
/jep/test/numpy/TestNumpy.java src/test/java/jep/test/numpy/TestNumpyArrayToString.java src/test/java/jep/test/numpy/TestNumpyProdShared.java src/test/java/jep/test/numpy/example/TestNumpyGILFreeze.java src/test/java/jep/test/numpy/example/TestNumpyMemoryLeak.java src/test/java/jep/test/numpy/exampl
e/TestNumpyProdLost.java src/test/java/jep/test/numpy/example/TestScipyFreeze.java src/test/java/jep/test/synchronization/TestCrossLangSync.java src/test/java/jep/test/types/TestFieldTypes.java src/test/java/jep/test/types/TestMethodTypes.java src/test/java/jep/test/types/TestStaticFieldTypes.java s
rc/test/java/jep/test/types/TestStaticMethodTypes.java
src\test\java\jep\test\Test.java:8: error: cannot find symbol
import jep.Jep;
^
symbol: class Jep
location: package jep
src\test\java\jep\test\Test.java:9: error: cannot find symbol
import jep.JepConfig;
^
:
:
symbol: class NDArray
location: class TestNumpy
src\test\java\jep\test\numpy\TestNumpy.java:170: error: cannot find symbol
public NDArray<int[]> testArgAndReturn(NDArray<int[]> array) {
^
symbol: class NDArray
location: class TestNumpy
100 errors
error: command 'D:\\Mahesh\\Programs\\jdk1.8.0_74/bin/javac' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2lilr_ba/jep/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-nehom1yp-record/install-record.txt -
-single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2lilr_ba/jep/
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
完整的输出可以在gist上找到。
这里出了什么问题?