ModuleNotFoundError: при попытке установить numpy 1.16 нет модуля с именем «distutils.msvccompiler».Python

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 ModuleNotFoundError: при попытке установить numpy 1.16 нет модуля с именем «distutils.msvccompiler».

Сообщение Anonymous »

Я работаю в среде conda и пытаюсь понизить версию numpy до версии 1.16, но при запуске pip install numpy==1.16 я постоянно получаю следующую ошибку:

Код: Выделить всё

$ pip install numpy==1.16
Collecting numpy==1.16
Downloading numpy-1.16.0.zip (5.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 10.8 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Running from numpy source directory.
/tmp/pip-install-jdof0z8r/numpy_4597057bbb504aa18b7bda112f0aa37f/numpy/distutils/misc_util.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?
return is_string(s) and ('*' in s or '?' is s)
Traceback (most recent call last):
File "", line 2, in 
File "
", line 34, in 
File "/tmp/pip-install-jdof0z8r/numpy_4597057bbb504aa18b7bda112f0aa37f/setup.py", line 415, in 
setup_package()
File "/tmp/pip-install-jdof0z8r/numpy_4597057bbb504aa18b7bda112f0aa37f/setup.py", line 394, in setup_package
from numpy.distutils.core import setup
File "/tmp/pip-install-jdof0z8r/numpy_4597057bbb504aa18b7bda112f0aa37f/numpy/distutils/core.py", line 26, in 
from numpy.distutils.command import config, config_compiler, \
File "/tmp/pip-install-jdof0z8r/numpy_4597057bbb504aa18b7bda112f0aa37f/numpy/distutils/command/config.py", line 19, in 
from numpy.distutils.mingw32ccompiler import generate_manifest
File "/tmp/pip-install-jdof0z8r/numpy_4597057bbb504aa18b7bda112f0aa37f/numpy/distutils/mingw32ccompiler.py", line 34, in 
from distutils.msvccompiler import get_build_version as get_build_msvc_version
ModuleNotFoundError: No module named 'distutils.msvccompiler'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Running setup.py clean for numpy
error: subprocess-exited-with-error

× python setup.py clean did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Running from numpy source directory.

`setup.py clean` is not supported, use one of the following instead:

- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)

Add `--force` to your command to use it anyway if you must (unsupported).

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed cleaning build dir for numpy
Failed to build numpy
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numpy)
Как это решить?


Подробнее здесь: https://stackoverflow.com/questions/790 ... ing-to-ins
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»