Anaconda虚拟环境(Windows OS)中python 2.7的dynet安装问题

时间:2018-08-29 20:13:43

标签: windows python-2.7 anaconda dynet

最初,我具有适用于python 3.6的anaconda环境。然后,我为python 2.7创建了另一个env来运行用2.7编写的程序,但是我需要安装 dynet 来运行该程序。

当我尝试为python 2.7安装dynet时,出现以下错误:

    (py27) C:\Users\mxr8050xx>pip install dynet
Collecting dynet
  Using cached https://files.pythonhosted.org/packages/b7/5f/ceaaf5f3a1d46da33f2182ad4f5ccddd68f2cea33d792ecb3f14e085fc98/dyNET-2.0.3.tar.gz
Requirement already satisfied: cython in c:\users\mxr8050xx\appdata\local\conda\conda\envs\py27\lib\site-packages (from dynet) (0.28.5)
Requirement already satisfied: numpy in c:\users\mxr8050xx\appdata\local\conda\conda\envs\py27\lib\site-packages (from dynet) (1.15.1)
Building wheels for collected packages: dynet
  Running setup.py bdist_wheel for dynet ... error
  Complete output from command C:\Users\mxr8050xx\AppData\Local\conda\conda\envs\py27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet\\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 c:\users\mxr805~1\appdata\local\temp\pip-wheel-3toyif --python-tag cp27:
  running bdist_wheel
  running build
  INFO:root:CMAKE_PATH='C:\\Program Files\\CMake\\bin\\cmake.exe'
  INFO:root:MAKE_PATH='C:\\Program Files\\Git\\mingw64\\bin\\make.exe'
  INFO:root:MAKE_FLAGS='-j 8'
  INFO:root:EIGEN3_INCLUDE_DIR='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet\\build\\py2.7-64bit\\eigen'
  INFO:root:EIGEN3_DOWNLOAD_URL='https://bitbucket.org/eigen/eigen/get/2355b229ea4c.zip'
  INFO:root:CC_PATH=None
  INFO:root:CXX_PATH=None
  INFO:root:SCRIPT_DIR='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet'
  INFO:root:BUILD_DIR='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet\\build\\py2.7-64bit'
  INFO:root:INSTALL_PREFIX='C:\\Users\\mxr8050xx\\AppData\\Local\\conda\\conda\\envs\\py27\\Lib\\site-packages\\..\\..\\..'
  INFO:root:PYTHON='C:\\Users\\mxr8050xx\\AppData\\Local\\conda\\conda\\envs\\py27\\python.exe'
  cmake version 3.12.1

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  error: `gcc` not found, and `CC` is not set.

  ----------------------------------------
  Failed building wheel for dynet
  Running setup.py clean for dynet
Failed to build dynet
Installing collected packages: dynet
  Running setup.py install for dynet ... error
    Complete output from command C:\Users\mxr8050xx\AppData\Local\conda\conda\envs\py27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\mxr805~1\appdata\local\temp\pip-record-v7xnoc\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    INFO:root:CMAKE_PATH='C:\\Program Files\\CMake\\bin\\cmake.exe'
    INFO:root:MAKE_PATH='C:\\Program Files\\Git\\mingw64\\bin\\make.exe'
    INFO:root:MAKE_FLAGS='-j 8'
    INFO:root:EIGEN3_INCLUDE_DIR='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet\\build\\py2.7-64bit\\eigen'
    INFO:root:EIGEN3_DOWNLOAD_URL='https://bitbucket.org/eigen/eigen/get/2355b229ea4c.zip'
    INFO:root:CC_PATH=None
    INFO:root:CXX_PATH=None
    INFO:root:SCRIPT_DIR='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet'
    INFO:root:BUILD_DIR='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet\\build\\py2.7-64bit'
    INFO:root:INSTALL_PREFIX='C:\\Users\\mxr8050xx\\AppData\\Local\\conda\\conda\\envs\\py27\\Lib\\site-packages\\..\\..\\..'
    INFO:root:PYTHON='C:\\Users\\mxr8050xx\\AppData\\Local\\conda\\conda\\envs\\py27\\python.exe'
    cmake version 3.12.1

    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    error: `gcc` not found, and `CC` is not set.

    ----------------------------------------
Command "C:\Users\mxr8050xx\AppData\Local\conda\conda\envs\py27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mxr805~1\\appdata\\local\\temp\\pip-install-wmuerf\\dynet\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\mxr805~1\appdata\local\temp\pip-record-v7xnoc\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\mxr805~1\appdata\local\temp\pip-install-wmuerf\dynet\
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

0 个答案:

没有答案