Closed DEEMOALICE closed 3 years ago
Hi,
Our package uses cython extensions that need to be built for a local import
(as python setup.py build_ext
).
As I understand from your 'fs' directory separators you use Windows.
Detailed instructions of how to build your own source code in Windows will
be updated in some days for now so stay tuned, in case you want to build it
yourself.
If not install one of the pre-build packages using pip install grakel-dev
.
In this case please go outside of the directory you are in somewhere where
grakel cannot be referenced locally and run your script.
This should work.
Thanks a lot for your feedback.
Στις Τρί, 24 Δεκ 2019 στις 4:30 π.μ., ο/η DEEMOALICE < notifications@github.com> έγραψε:
Traceback (most recent call last): File "D:\python\test\GraKeL-develop\test.py", line 9, in from grakel import GraphKernel File "D:\python\test\GraKeL-develop\grakelinit.py", line 6, in from grakel.graph_kernels import GraphKernel File "D:\python\test\GraKeL-develop\grakel\graphkernels.py", line 13, in from grakel.kernels import GraphletSampling File "D:\python\test\GraKeL-develop\grakel\kernelsinit_.py", line 4, in from grakel.kernels.kernel import Kernel File "D:\python\test\GraKeL-develop\grakel\kernels\kernel.py", line 17, in from grakel.kernels._c_functions import k_to_ij_triangular ImportError: cannot import name 'k_to_ij_triangular' from 'grakel.kernels._c_functions' (unknown location) [Finished in 1.2s with exit code 1]
I just installed grakel according to the tutorial on github and ran the test. The above BUG appeared, and the package could not be installed.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ysig/GraKeL/issues/22?email_source=notifications&email_token=AGY7H2LRV2CDZCZ4HO5M443Q2FX5PA5CNFSM4J6Z3QQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICNWWCQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGY7H2ISBFW2UMXW6RBPY5DQ2FX5PANCNFSM4J6Z3QQA .
Please see: https://ysig.github.io/GraKeL/0.1a7/documentation/installation.html#building-grakel
I have tried out the installing command, which are:
conda create -n GraKeL python=3.6
pip install grakel --verbose
pip install sphinx sphinxcontrib-bibtex numpydoc sphinx-rtd-theme sphinx-gallery
The third line is to compile offline doc.
Traceback (most recent call last):
File "D:/04.CEcode/GraKeL-master/examples/weisfeiler_lehman_subtree.py", line 17, in
This problem appeared for me.. I already install Windows Virtual Studio SDK and execute python setup.py install, but these reminder as follows when execute python install.py build_ext: (py3) D:\04.CEcode\GraKeL-master>python setup.py build_ext running build_ext skipping './grakel/kernels/_isomorphism\bliss.cpp' Cython extension (up-to-date) skipping './grakel/kernels/_c_functions\functions.cpp' Cython extension (up-to-date)
pip install grakel-dev
hello,my envirement is ubuntu 16.04 python 3.6 I want use your program by pycharm but it does not work ,I want debug it , thank you.
Traceback (most recent call last):
File "/home/wjc/Desktop/yxt/GraKeL-master/examples/shortest_path.py", line 17, in
pip install grakel-dev
hello,my envirement is ubuntu 16.04 python 3.6 I want use your program by pycharm but it does not work ,I want debug it , thank you.
Traceback (most recent call last): File "/home/wjc/Desktop/yxt/GraKeL-master/examples/shortest_path.py", line 17, in from grakel.datasets import fetch_dataset File "/home/wjc/Desktop/yxt/GraKeL-master/grakel/init.py", line 6, in from grakel.graph_kernels import GraphKernel File "/home/wjc/Desktop/yxt/GraKeL-master/grakel/graph_kernels.py", line 13, in from grakel.kernels import GraphletSampling File "/home/wjc/Desktop/yxt/GraKeL-master/grakel/kernels/init.py", line 4, in from grakel.kernels.kernel import Kernel File "/home/wjc/Desktop/yxt/GraKeL-master/grakel/kernels/kernel.py", line 17, in from grakel.kernels._c_functions import k_to_ij_triangular ImportError: cannot import name 'k_to_ij_triangular'
it need conda create -n env_name python=3.6 and refer https://ysig.github.io/GraKeL/0.1a7/documentation/installation.html#building-grakel
Can you try pip install grakel
instead?
I met this issue today. Finally, it turned out to be a really stupid mistake: leave the directory where the setup.py was!
I got the exact same problem. I did follow the instructions to build the ext: https://ysig.github.io/GraKeL/0.1a8/documentation/installation.html#building-grakel
The problem is building the _c_functions
has no submodule, only a single _c_functions.cpython.***.so
are generated.
While _isomorphism
has bliss
and intpybliss
.
Therefore I changed the import to be
from grakel.kernels import _c_functions
and use the function as
_c_functions.k_to_ij_triangular(...)
Probably need to restructure the _c_functions
the similar as _isomorphism
Hey cshjin.
Normally if you install grakel as a package you won't encounter this issue as it is prebuilt. So there are likely two reasons for this to be happening:
Can you describe:
python --version
) andThanks
@ysig I am using python 3.7.10 and ubuntu 20.04 with GCC ver 9.3
I just run the examples and tutorials and see the problems there.
Can you try:
pip install https://files.pythonhosted.org/packages/6b/b9/1c30ffc28bbf995408cadd33ede4a6bf64bfbfa86d90c1a3ab7e0b699fda/grakel-0.1.8-cp37-cp37m-manylinux1_x86_64.whl
or
pip install https://files.pythonhosted.org/packages/36/c0/89ad5326d4a75f5abe9a6a7a7d28988e5b51692d9902239f56e43c296ae0/grakel-0.1.8-cp37-cp37m-manylinux2010_x86_64.whl
as located here: https://pypi.org/project/grakel/#modal-close
It works with the installation from pip install ***-manylinux1_x86_64.whl
Thanks.
Traceback (most recent call last): File "D:\python\test\GraKeL-develop\test.py", line 9, in
from grakel import GraphKernel
File "D:\python\test\GraKeL-develop\grakel__init.py", line 6, in
from grakel.graph_kernels import GraphKernel
File "D:\python\test\GraKeL-develop\grakel\graph_kernels.py", line 13, in
from grakel.kernels import GraphletSampling
File "D:\python\test\GraKeL-develop\grakel\kernels\ init__.py", line 4, in
from grakel.kernels.kernel import Kernel
File "D:\python\test\GraKeL-develop\grakel\kernels\kernel.py", line 17, in
from grakel.kernels._c_functions import k_to_ij_triangular
ImportError: cannot import name 'k_to_ij_triangular' from 'grakel.kernels._c_functions' (unknown location)
[Finished in 1.2s with exit code 1]
I just installed grakel according to the tutorial on github and ran the test. The above BUG appeared, and the package could not be installed.