установить модуль python для использования графического процессора в Windows 8.1 x64

У меня возникли проблемы с установкой модулей python.
Я хочу использовать GPU в скрипте python, но получаю ошибку при установке модулей
1- Я устанавливаю графический драйвер: Geforce GT 650M
2- Устанавливаю cuda_5. 5.31_winvista_win7_win8_win8.1_notebook_x64.exe
Теперь я хочу установить модули, и вот ошибки:

Пиритовая ошибка:

C:\Users\Ali\Desktop\pygpu\pyrit-0.4.0>python setup.py build
running build
running build_py
running build_ext
building 'cpyrit._cpyrit_cpu' extension
error: Unable to find vcvarsall.bat

C:\Users\Ali\Desktop\pygpu\pyrit-0.4.0>python setup.py install
running install
running build
running build_py
running build_ext
building 'cpyrit._cpyrit_cpu' extension
error: Unable to find vcvarsall.bat

C:\Users\Ali\Desktop\pygpu\pyrit-0.4.0>

cpyrit-cuda Ошибка:

C:\Users\Ali\Desktop\pygpu\cpyrit-cuda-0.4.0>python setup.py build
The CUDA compiler and headers required to build kernel were not found. Trying to
 continue anyway...
running build
running build_ext
'nvcc' is not recognized as an internal or external command,
operable program or batch file.
None
Failed to execute command 'nvcc -V'
Traceback (most recent call last):
  File "setup.py", line 175, in <module>
    setup(**setup_args)
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 82, in run
    raise SystemError("Nvidia's CUDA-compiler 'nvcc' can't be " \
SystemError: Nvidia's CUDA-compiler 'nvcc' can't be found.

C:\Users\Ali\Desktop\pygpu\cpyrit-cuda-0.4.0>python setup.py install
The CUDA compiler and headers required to build kernel were not found. Trying to
 continue anyway...
running install
running build
running build_ext
'nvcc' is not recognized as an internal or external command,
operable program or batch file.
None
Failed to execute command 'nvcc -V'
Traceback (most recent call last):
  File "setup.py", line 175, in <module>
    setup(**setup_args)
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 82, in run
    raise SystemError("Nvidia's CUDA-compiler 'nvcc' can't be " \
SystemError: Nvidia's CUDA-compiler 'nvcc' can't be found.

C:\Users\Ali\Desktop\pygpu\cpyrit-cuda-0.4.0>

Пикуда Ошибка:

C:\Users\Ali\Desktop\pygpu\pycuda-2013.1.1>python setup.py build
*** WARNING: nvcc not in path.
Traceback (most recent call last):
  File "setup.py", line 218, in <module>
    main()
  File "setup.py", line 88, in main
    conf["CUDA_INC_DIR"] = [join(conf["CUDA_ROOT"], "include")]
  File "C:\Python27\lib\ntpath.py", line 96, in join
    assert len(path) > 0
TypeError: object of type 'NoneType' has no len()

C:\Users\Ali\Desktop\pygpu\pycuda-2013.1.1>python setup.py install
*** WARNING: nvcc not in path.
Traceback (most recent call last):
  File "setup.py", line 218, in <module>
    main()
  File "setup.py", line 88, in main
    conf["CUDA_INC_DIR"] = [join(conf["CUDA_ROOT"], "include")]
  File "C:\Python27\lib\ntpath.py", line 96, in join
    assert len(path) > 0
TypeError: object of type 'NoneType' has no len()

C:\Users\Ali\Desktop\pygpu\pycuda-2013.1.1>

пустая ошибка:

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0>python setup.py build
Running from numpy source directory.
non-existing path in 'numpy\\distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python
27\\libs']
  NOT AVAILABLE

openblas_info:
  libraries openblas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\l
ibs']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', '
C:\\Python27\\libs']
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\
Python27\\libs']
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1522: User
Warning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs'
]
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1531: User
Warning:
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1534: User
Warning:
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
  NOT AVAILABLE

non-existing path in 'numpy\\lib': 'benchmarks'
lapack_opt_info:
lapack_mkl_info:
mkl_info:
  libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python
27\\libs']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
  libraries lapack_atlas not found in C:\Python27\lib
  libraries ptf77blas,ptcblas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
  libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
  libraries f77blas,cblas,atlas not found in C:\Python27\lib
  libraries lapack_atlas not found in C:\Python27\lib
  libraries f77blas,cblas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries f77blas,cblas,atlas not found in C:\Python27\libs
  libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1428: User
Warning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
  libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\lib
s']
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1439: User
Warning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1442: User
Warning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
 'define_macros'
  warnings.warn(msg)
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler opti
ons
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler opt
ions
running build_src
build_src
building py_modules sources
creating build
creating build\src.win-amd64-2.7
creating build\src.win-amd64-2.7\numpy
creating build\src.win-amd64-2.7\numpy\distutils
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0>python setup.py install
Running from numpy source directory.
non-existing path in 'numpy\\distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python
27\\libs']
  NOT AVAILABLE

openblas_info:
  libraries openblas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\l
ibs']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', '
C:\\Python27\\libs']
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\
Python27\\libs']
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1522: User
Warning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs'
]
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1531: User
Warning:
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1534: User
Warning:
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
  NOT AVAILABLE

non-existing path in 'numpy\\lib': 'benchmarks'
lapack_opt_info:
lapack_mkl_info:
mkl_info:
  libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python
27\\libs']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
  libraries lapack_atlas not found in C:\Python27\lib
  libraries ptf77blas,ptcblas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
  libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
  libraries f77blas,cblas,atlas not found in C:\Python27\lib
  libraries lapack_atlas not found in C:\Python27\lib
  libraries f77blas,cblas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries f77blas,cblas,atlas not found in C:\Python27\libs
  libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1428: User
Warning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
  libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\lib
s']
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1439: User
Warning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
  NOT AVAILABLE

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0\numpy\distutils\system_info.py:1442: User
Warning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
 'define_macros'
  warnings.warn(msg)
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler opti
ons
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler opt
ions
running build_src
build_src
building py_modules sources
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat

C:\Users\Ali\Desktop\pygpu\numpy-1.8.0>

Ошибка повышения:

C:\Users\Ali\Desktop\pygpu\boost_1_55_0>bootstrap.bat
Building Boost.Build engine
'cl' is not recognized as an internal or external command,
operable program or batch file.

Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

C:\Users\Ali\Desktop\pygpu\boost_1_55_0>

Кто-нибудь здесь расскажет мне, как мне установить nvcc и где я могу его скачать.


person user2244393    schedule 31.12.2013    source источник


Ответы (1)


Здесь вам не хватает нескольких вещей.

  1. Эта ошибка vcvarsall объясняется здесь, вам нужно будет установить переменные.
  2. Тогда вам не хватает nvcc, как указано в WARNING: nvcc not in path. и подобных сообщениях.
  3. В numpy отсутствуют зависимые библиотеки, которые следует установить в первую очередь.
  4. Для boost вы должны следовать предложению и использовать готовый двоичный файл.

В целом, я бы сказал, что все дело в чтении и понимании сообщений об ошибках. В качестве предложения: следуйте инструкциям по установке на веб-сайтах библиотек, которые также покажут вам зависимости.

person Sebastian Dressler    schedule 31.12.2013
comment
не могли бы вы помочь больше для nvcc? - person user2244393; 31.12.2013
comment
Вам необходимо установить CUDA для Windows. - person Sebastian Dressler; 31.12.2013
comment
я устанавливаю это раньше - person user2244393; 31.12.2013
comment
также переустановите и получите результат: Установлено: - Nsight Monitor и HUD Launcher - Nsight C++ Целевая поддержка AMP для MSVSMON Не установлено: - Nsight для Visual Studio 2012 Причина: VS2012 не найден - Nsight для Visual Studio 2010 Причина: VS2010 не найден - Nsight для Visual Studio 2008 Причина: VS2008 SP1 не найден - Nsight C++ AMP Debugger для Visual Studio 2012 Причина: VS2012 не найден - person user2244393; 31.12.2013
comment
Похоже, он хочет установить для VS2012, а у вас есть VS2010. - person Sebastian Dressler; 31.12.2013
comment
я устанавливаю VS2012 и cuda, numpy, boost, и теперь у меня есть новая проблема с pycuda - person user2244393; 31.12.2013
comment
C:\Users\Ali\Desktop\pygpu\pycuda-2013.1.1>python setup.py build running build running build_py running build_ext build Ошибка расширения '_driver': невозможно найти vcvarsall.bat C:\Users\Ali\Desktop\ pygpu\pycuda-2013.1.1› - person user2244393; 31.12.2013
comment
Вот мы и снова в точке №1. Вы читали ссылку, которую я дал? - person Sebastian Dressler; 31.12.2013
comment
я также проверяю configure.py и siteconf.py, в siteconf.py я просто не знаю, что такое CXXFLAGS = [] LDFLAGS = [] [последние 2 строки] и что я должен вставить в них? Благодарность - person user2244393; 31.12.2013
comment
Предварительно собранные двоичные файлы находятся здесь. Сборка не нужна... - person Sebastian Dressler; 31.12.2013
comment
эй, tnx установлен: D, если у меня возникнут какие-либо вопросы, очень полезно ‹3 - person user2244393; 31.12.2013
comment
Пожалуйста. Но, пожалуйста, сначала попробуйте Google и попытайтесь прочитать / понять сообщение об ошибке, за этим (в основном) нет никакой магии. Не забудьте принять ответ. - person Sebastian Dressler; 31.12.2013
comment
эй, друг, я часто получаю эту ошибку, nvcc: фатальная ошибка: не удается найти компилятор «cl.exe» в PATH, я знаю, что нужно добавить путь к cl.exe в инструменты, но скажи мне, как его добавить, я что-то нашел, компьютер › свойства › расширенные настройки системы › продвижение [вкладка] › переменные среды › нажмите «новый», я думаю, что там, но как имя переменной? я знаю, что значение - это путь, но что такое имя? tnx: D или если есть другой способ, скажи мне - person user2244393; 01.01.2014
comment
Почему вы не используете Google? Я мгновенно нашел связанный вопрос SO: Скомпилируйте CUDA без Visual Studio — «Не удается найти компилятор cl.exe в пути». - person Sebastian Dressler; 01.01.2014
comment
я делаю то же самое, также видел, что в Google я добавляю переменную NVCC со значением: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin, а также добавляю путь D:\Software\VS2012\VC\bin\ amd64, но все равно эта ошибка не находит cl.exe - person user2244393; 01.01.2014
comment
Вы установили Windows SDK, как было предложено в посте? - person Sebastian Dressler; 01.01.2014
comment
Я был установлен, но некоторые проблемы с x86 и x64 были исправлены переустановкой, я много спрашиваю: D снова возник вопрос, у вас есть что-то более простое для программирования gpu с помощью python на windows? pycuda чаще всего использует C .... есть что-то лучше? - person user2244393; 01.01.2014
comment
Я бы предложил придерживаться Visual Studio и CUDA. - person Sebastian Dressler; 01.01.2014
comment
tnx, чувак, у меня другой вопрос: D, можем ли мы использовать system() в C и запустить скрипт python той же системы ('python sebastian.py'), что и gpu? возможно ли это, тогда я смогу запрограммировать Python и закончить свою работу - person user2244393; 03.01.2014
comment
Есть интерфейс Python/C. Используйте документацию Python. В противном случае вам следует задать новый вопрос. - person Sebastian Dressler; 03.01.2014
comment
Хорошо :D я задаю новый вопрос через несколько секунд tnQ - person user2244393; 03.01.2014
comment
пожалуйста, проверьте здесь stackoverflow.com/questions/20908882/ спасибо - person user2244393; 03.01.2014