Re: Building Python wheels with Fortran on Windows 10 under Python 3.8
James <[email protected]> Mon, 13 Jan 2020 11:33:51 +0000
| Newsgroups | gmane.comp.python.scientific.user |
|---|---|
| Message-ID | <CAGMysRd_Q26+rfU1toQ8yDOYfp8zSUvXsEBLFxp1wtgoP2PcuQ@mail.gmail.com> |
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 <[email protected]> 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 > [email protected] > https://mail.python.org/mailman/listinfo/scipy-user > _______________________________________________ SciPy-User mailing list [email protected] https://mail.python.org/mailman/listinfo/scipy-user