-
Notifications
You must be signed in to change notification settings - Fork 24
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
The issues on building on windows #17
Comments
@shwina after python setuyp.py install ,this error occurred. |
Did you install into a Conda environment? If so, did you activate the environment before launching the Python interpreter? |
@shwina I have installed the |
Thanks - I'm not sure what the issue is and I'm unable to diagnose currently without access to a Windows machine. I suspect that the path to the AMGX libraries is missing from the |
@pyramidpoint were you able to resolve this or are you still having this issue? |
@shwina I still have this problem but I can implement it in C,win10,vs2015 |
@shwina Hi~ I am trying to build pyamgx on windows, but run into this error |
Hi @lacrymose. Unfortunately, I don't have access to a Windows machine to test currently, but it looks like the problem you're encountering is similar to the one described here: Unidata/netcdf4-python#460 Could I ask you to try the fix for that issue (Unidata/netcdf4-python#461)? Specifically, you would have to change this part of from Cython.Build import cythonize
ext = cythonize([
Extension(
'pyamgx',
sources=['pyamgx/pyamgx.pyx'],
depends=['pyamgx/*.pyx, pyamgx/*.pxi'],
libraries=['amgxsh'],
language='c',
include_dirs = [
numpy.get_include(),
] + AMGX_include_dirs,
library_dirs = [
numpy.get_include(),
] + AMGX_lib_dirs,
runtime_library_dirs = [
numpy.get_include(),
] + AMGX_lib_dirs,
)]) to this: if sys.platform == "win32":
runtime_lib_dirs = []
else:
runtime_lib_dirs = [numpy.get_include(),] + AMGX_lib_dirs
from Cython.Build import cythonize
ext = cythonize([
Extension(
'pyamgx',
sources=['pyamgx/pyamgx.pyx'],
depends=['pyamgx/*.pyx, pyamgx/*.pxi'],
libraries=['amgxsh'],
language='c',
include_dirs = [
numpy.get_include(),
] + AMGX_include_dirs,
library_dirs = [
numpy.get_include(),
] + AMGX_lib_dirs,
runtime_lib_dirs=runtime_lib_dirs
)]) If that works, you are more than welcome to submit the change as a PR to this repository. |
I can confirm that it works. But as
This can be done by either adding set PATH=path/to/your/library;%PATH%
:: for example
:: set PATH=path/to/your/AMGX/build/Release;%PATH% or build the package with the runtime as component like: if sys.platform == "win32":
# find the path to .dll runtime
data_files = [('', [os.path.join(AMGX_BUILD_DIR, 'Release/amgxsh.dll')])]
else:
data_files = []
...
setup(...
data_files=data_files,
...) A complete version can be fount here (with another pr's fix merged for compatibility with AMGX 2.4.0). |
Hi @yanang007 Thanks for the update! While I don't actively develop this package anymore, I would be happy to merge a PR if you opened one. |
Hi @shwina, sure! I could make a pr after making it more generic! |
No description provided.
The text was updated successfully, but these errors were encountered: