[SciPy-User] Building Python wheels with Fortran on Windows 10 under Python 3.8
James
tomo.bbe at gmail.com
Mon Jan 13 06:33:51 EST 2020
Johan,
Have you read the porting notes for 3.8? There's a change to how libraries
on Windows are loaded. You will likely need to use the new
`os.add_dll_directory()` function.
https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew
Regards,
James
On Mon, 13 Jan 2020 at 10:09, Johann Rohwer <jr at sun.ac.za> wrote:
> Hi all
>
> First of all, my apologies if this is not the right place for this query,
> if so, please direct me to a more appropriate forum.
>
> We have developed a Python package for computational systems biology that
> wraps two Fortran extension modules:
> https://github.com/PySCeS/pysces
>
> For the distribution of binary wheels under Windows I've been compiling
> the Fortran extension modules with MinGWin and using MSVC++ compiler to
> compile the Python extension, as implimented in numpy distutils and
> explained in detail in this blog post:
> https://pav.iki.fi/blog/2017-10-08/pywingfortran.html
>
> This has been working fine for previous versions of Python (3.6 and 3.7),
> but under Python 3.8 the DLL won't load, I get the following error message
> when trying to import the package:
>
> DLL load failed while importing pitcon: The specified module could not be
> found.
> INFO: Pitcon import failed: continuation not available
> DLL load failed while importing nleq2: The specified module could not be
> found.
> INFO: NLEQ2 import failed: option not available
>
> This is using Python 3.8.1 downloaded from python.org under Windows 10
> 64-bit, also using 64-bit MinGWin.
>
> When building the package under Python 3.8, the compile runs without error
> and the DLL files get packaged in the .libs folder beneath the top-level
> package folder, as for the other Python versions. Only problem is that they
> can't be loaded during import.
>
> Dependencies for the build (numpy, scipy, matplotlib) are installed using
> pip into a clean install of the respective Python version:
> matplotlib 3.1.2
> numpy 1.18.1
> scipy 1.4.1
>
> Has anything changed in how this is handled under Python 3.8? I'm stymied
> because it all works off exactly the same code base under Python 3.6 and
> 3.7, and moreover the compile and wheel build completes without error, also
> on Python 3.8.
>
> Thanks,
> Johann
>
>
>
> The integrity and confidentiality of this e-mail is governed by these
> terms / Die integriteit en vertroulikheid van hierdie e-pos word deur die
> volgende bepalings gereël. http://www.sun.ac.za/emaildisclaimer
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at python.org
> https://mail.python.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20200113/1897ccde/attachment.html>
More information about the SciPy-User
mailing list