Open yerzhik opened 4 years ago
Try with the -e
option. If that works, please update the title of this issue to be more specific. Thanks.
Facing the same issue with python setup.py install
too. It's strange because importing mxnet seems to work with Python3 but not Python2.
Python 2 is EOL and unsupported indeed.
@leezu Is there a way I can modify CMakeLists.txt to compile mxnet to work with Python2.7? Or perhaps a previous version of mxnet that I could use?
This is unrelated to cmake. But yes, you can use MXNet 1.6, which is the last release of MXNet support Python 2. See https://github.com/apache/incubator-mxnet/releases/tag/1.6.0
However, wanting to use Python 2 seems quite dubious to me. Are you sure you need that?
I am trying to build mxnet from source because a repository (who's code I am trying to run) has provided custom operators that need to be included in the source. The repository code is in Python2. After I install the python binding, running import mxnet
in a Python2 interpreter gives me ImportError: cannot import name _LIB
, whereas it runs successfully in a Python3 interpreter.
You probably want to use the same version of MXNet as used by the authors of that repo, as it appears that repo is quite old?
@leezu That's what I initially did. :( The authors use https://github.com/apache/incubator-mxnet/tree/62ecb60 for their experiment, but I got compilation errors that I couldn't solve. I have limited computing resources so I couldn't try out that install too many times before deciding to move to the latest version. I would love to get this install working in a Python2 environment. Thanks for your quick replies!
You can try following the old install guide: https://mxnet.apache.org/versions/0.11.0/get_started/install.html
Description
succesfuly run make (cmake, make) then, after running pip install --user . (without -e option) getting error message (below)
Error Message
To Reproduce
Just trying to install using pip install --user happens with pip3 or pip2
Steps to reproduce
(Paste the commands you ran that produced the error.)
What have you tried to solve it?
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below: