-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from scikits.odes.sundials.cvode cimport CV_RhsFunction does not work #108
Comments
What command are you running? I have tried the following based on 70 but without success.
I have tried variations of how I import If I use the example as given
results in the above output, but both |
@utsekaj42 Could not look at this today, for next week. Note that current master is not tested with python 3.7, see https://travis-ci.org/bmcage/odes/builds/576422107 For your error, add a print to see what directory is searched in, the error is clearly
As long as the pxd is not found, it cannot work, scikits must be on the python path. @cmashraf same for you, the pxd is not found, so it cannot work:
|
I added
scikits.odes is installed at '~/anaconda3/envs/skod/lib/python3.7/site-packages/scikits/' |
You need So, you are testing the van der pol example. On my system, I obtain a bug in the sig, with current odes the function should be
Note the extra The sig error is after the import, so the import is working for me with an |
It seems both The actual minimal set of includes I have been able use are as follows:
and to run it save the following as
and run I am a bit curious about the need for "-I ~/odes". I actually am not able to install from source in my environment (something to figure out at a later date), so odes is only installed from PyPI, so the scikit that is loaded to run in python is different from that used by cython to compile. Naively, I would expect that it could be configured so that the necessary files for a cython RHS could be packaged in site-packages. Something to look into later. It seems to work for now. |
if all installed in site-packates, pointing -I to where odes is installed, so that In your original post you do not have it. You have
You would need |
So should the following succeed?
It does not. I include the output of
and
|
Following up with issue #107, when I am using the command
from scikits.odes.sundials.cvode cimport CV_RhsFunction
and cythonize, I get the following error
Error compiling Cython file:
...
print("Hello")
import numpy as np
from cpython cimport bool
cimport numpy as np
from scikits.odes.sundials.cvode cimport CV_RhsFunction
^
hello.pyx:5:0: 'scikits/odes/sundials/cvode.pxd' not found
Error compiling Cython file:
...
print("Hello")
import numpy as np
from cpython cimport bool
cimport numpy as np
from scikits.odes.sundials.cvode cimport CV_RhsFunction
^
hello.pyx:5:0: 'scikits/odes/sundials/cvode/CV_RhsFunction.pxd' not found
Traceback (most recent call last):
File "setup.py", line 5, in
ext_modules=cythonize("hello.pyx"))
File "/gscratch/pfaendtner/Chowdhury/codes/Anaconda/envs/odes/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1096, in cythonize
cythonize_one(*args)
File "/gscratch/pfaendtner/Chowdhury/codes/Anaconda/envs/odes/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1219, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: hello.pyx
I get the same error too when I try to use cython magic in Jupiter notebook. I think I managed to install both the sundials and scikits.odes successfully as I can run other non-cython examples and nosetests. I also have set SUNDIALS_INST and LD_LIBRARY_PATH.
Any idea why this is not working?
The text was updated successfully, but these errors were encountered: