libact
libact copied to clipboard
ModuleNotFoundError: No module named 'Cython'
As indicated in the title, when I run the "pip install libact" command, it says that the cython module is missing, even though it's installed correctly. I've uninstalled it, reinstalled it, but it doesn't work. I've also changed the version of python 3.6 to python 3.5.4 because I thought there might be an accounting problem, but it still doesn't work.
Do you have any additional error message that can be provided? Can you also check if you can import cython correctly from your Python interpreter (i.e. try python -c "import cython"
on your commandline)?
Hello @yangarbiter, thank you for your answer. When I import cython from my python interpreter, I have no problem: Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import cython
>>> exit()
On the other hand, as soon as I want to install libact, I get this message:
Collecting libact
Using cached libact-0.1.6.tar.gz (118 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9iwsbsyw/libact/setup.py'"'"'; file='"'"'/tmp/pip-install-9iwsbsyw/libact/setup. py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"'', '"'"'\n'"'"');f. close();exec(compile(code, file, '"'"'exec'"'""))' egg_info --egg-base /tmp/pip-install-9iwsbsyw/libact/pip-egg-info
cwd: /tmp/pip-install-9iwsbsyw/libact/
Complete output (5 lines):
Traceback (most recent call last):
File "
When I type "pip install -vvv libact" to get more informations, I get that error message : ` Error compiling Cython file: ------------------------------------------------------------ ... #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
import numpy as np
cimport numpy as np
from libc.stdlib cimport free
cimport _hintsvm
^
------------------------------------------------------------
libact/query_strategies/_hintsvm.pyx:6:8: '_hintsvm.pxd' not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-v1y5l5yw/libact_10b1286b826841d2a0e89d5e14350303/setup.py", line 44, in <module>
extra_compile_args=['-lstdc++'],
File "/home/roline/miniconda3/envs/libact/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/roline/miniconda3/envs/libact/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: libact/query_strategies/_hintsvm.pyx
Platform Detection: Linux. Link to liblapacke...
Compiling libact/query_strategies/_hintsvm.pyx because it changed.
[1/1] Cythonizing libact/query_strategies/_hintsvm.pyx
WARNING: Discarding https://files.pythonhosted.org/packages/71/28/5ef80e435f7e1b829fa5aa50d5ca81df09af11975314dcbf43a6ec1759a4/libact-0.1.1.tar.gz#sha256=d30352bbfaaaec435bcf6486aec290813af8bc5defc973d511993ea473a6d447 (from https://pypi.org/simple/libact/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement libact (from versions: 0.1.1, 0.1.1.post1, 0.1.1.post2, 0.1.1.post3, 0.1.2, 0.1.3b0, 0.1.3b1, 0.1.3, 0.1.4a0, 0.1.4, 0.1.5, 0.1.6) ERROR: No matching distribution found for libact `
@yangarbiter can you give me the version of cython and liblapacke-dev? Because I'm having accounting problems
I'm having the same problem, could you find a solution?
Sorry for the late reply. There seems to be something wrong with the wheel building process. One temporary workaround is to download the source code and install from python ./setup.py install
. Can you try that and let me know if that works?