Skip to content
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

Deprecation package updates #135

Open
florentdemelezi opened this issue Apr 4, 2024 Discussed in #134 · 2 comments
Open

Deprecation package updates #135

florentdemelezi opened this issue Apr 4, 2024 Discussed in #134 · 2 comments

Comments

@florentdemelezi
Copy link

Discussed in #134

Originally posted by florentdemelezi April 2, 2024
Hi all,

I am trying to use aquacrop in vscode although using python 3.8.10 and 3.10 I seem to get the same error message for
from numba.pycc import CC
which prohibits running the modules and package itself in visual-studio-code.
Is it planned to update the aquacrop module or if someone solved it they could guide me through it?
I noticed that the from numba.pycc import CC is deprecated and need to be modified?

temporary name for compiled module

cc = CC("solution_cc_development")

@cc.export("cc_development", "f8(f8,f8,f8,f8,f8,unicode_type,f8)")
def cc_development(
CCo: float,

@tfoster88
Copy link
Contributor

tfoster88 commented Jul 12, 2024

Thanks @florentdemelezi. If you are getting issues with compiling, usually it can be solved by the following troubleshooting steps:

First, run "python -m aquacrop.scripts.initiate_library" in your terminal, if this generates an error such as "RuntimeError: Attempted to compile AOT function without the compiler used by numpy.distutils present. Cannot find suitable msvc.", then you need to download and install an MSVC compiler such as the one included in Visual Studio build tools (see e.g. https://www.youtube.com/watch?v=p_R3tXSq0KI).

If this doesn't help solve the error message, then you can run aquacrop in pure python using:

import os

os.environ['DEVELOPMENT'] = 'DEVELOPMENT'

This second fix will make the model slower as it turns off the ahead of time compiling which is the common cause of these kinds of error messages

We are looking into alternatives to the numba AOT as its generally been a bit of a pain to maintain, but fixing this will take a few weeks at least

@git-divyamgarg
Copy link

Hello @tfoster88 , did you manage to fix this compilation issue? Any alternative to numba AOT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants