apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

Home Page:https://mxnet.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use pip to install mxnet via VScode

Jason-will3 opened this issue · comments

Description

Cannot use pip to install mxnet via VScode:
Every time I use the command 'pip install mxnet', it always stuck at here for a while:
'```
Using legacy 'setup.py install' for numpy, since package 'wheel' is not installed.
Installing collected packages: numpy, graphviz, certifi, requests, mxnet
Attempting uninstall: numpy
Found existing installation: numpy 1.23.1
Uninstalling numpy-1.23.1:
Successfully uninstalled numpy-1.23.1
Running setup.py install for numpy ... -


The it will report the error.
### Error Message

error: Command "D:\VS\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.1\numpy\core\src\umath -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Inumpy\core\include -Ibuild\src.win-amd64-3.1\numpy\core\include/numpy -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -IE:\Python\include -IE:\Python\Include -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -ID:\VS\VC\Tools\MSVC\14.26.28801\ATLMFC\include -ID:\VS\VC\Tools\MSVC\14.26.28801\include -ID:\Windows Kits\10\include\10.0.18362.0\ucrt -ID:\Windows Kits\10\include\10.0.18362.0\shared -ID:\Windows Kits\10\include\10.0.18362.0\um -ID:\Windows Kits\10\include\10.0.18362.0\winrt -ID:\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcbuild\src.win-amd64-3.1\numpy\core\src\multiarray\scalartypes.c /Fobuild\temp.win-amd64-3.10\Release\build\src.win-amd64-3.1\numpy\core\src\multiarray\scalartypes.obj" failed with exit status 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> numpy

note: This is an issue with the package mentioned above, not pip.



## Environment

Package         Version
--------------- -------
chardet         3.0.4
flake8          4.0.1
idna            2.6
mccabe          0.6.1
numpy           1.23.1
pandas          1.4.3
pip             22.2.1
pycodestyle     2.8.0
pyflakes        2.4.0
python-dateutil 2.8.2
pytz            2022.1
setuptools      58.1.0
six             1.16.0
urllib3         1.22

</details>

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue.
Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly.
If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.

Hi, numpy is a dependency of mxnet, which is why it is getting installed. Because you do not have the wheel package installed, your system is attempting to build it from source and failing.

Can you try pip install wheel before running pip install mxnet so pip can utilize pre-compiled packages instead of building numpy from source?