question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help installing on Win64 with MSYS2 (mingw64 compilers)

See original GitHub issue

Describe the issue

I am trying to get sisl installed on Windows, in plain Python installation (i.e. not Anaconda). My best take is to install MSYS2, install gcc and gfortran packages there and then pip gets farther as seen in the output below

koval@DESKTOP-B5CLTB9 MINGW64 ~/programs
$ pip install sisl
Collecting sisl
  Downloading sisl-0.10.0.tar.gz (3.4 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Requirement already satisfied: numpy>=1.13 in c:\users\koval\appdata\local\programs\python\python37\lib\site-packages (from sisl) (1.18.1)
Requirement already satisfied: pyparsing>=1.5.7 in c:\users\koval\appdata\local\programs\python\python37\lib\site-packages (from sisl) (2.4.6)
Collecting netCDF4
  Downloading netCDF4-1.5.4.tar.gz (793 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\koval\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\koval\\AppData\\Local\\Temp\\pip-install-v801fhjq\\netCDF4\\setup.py'"'"'; __file__='"'"'C:\\Users\\koval\\AppData\\Local\\Temp\\pip-install-v801fhjq\\netCDF4\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\koval\AppData\Local\Temp\pip-pip-egg-info-tyxwvna8'
         cwd: C:\Users\koval\AppData\Local\Temp\pip-install-v801fhjq\netCDF4\
    Complete output (16 lines):
    reading from setup.cfg...

        HDF5_DIR environment variable not set, checking some standard locations ..
    checking C:\Users\koval ...
    checking /usr/local ...
    checking /sw ...
    checking /opt ...
    checking /opt/local ...
    checking /usr ...
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\koval\AppData\Local\Temp\pip-install-v801fhjq\netCDF4\setup.py", line 397, in <module>
        _populate_hdf5_info(dirstosearch, inc_dirs, libs, lib_dirs)
      File "C:\Users\koval\AppData\Local\Temp\pip-install-v801fhjq\netCDF4\setup.py", line 345, in _populate_hdf5_info
        raise ValueError('did not find HDF5 headers')
    ValueError: did not find HDF5 headers
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Version details Run the below code and add to issue (if an issue is relevant for the issue):

import sys
print(sys.version)
import sisl
print(sisl.__version__)
print(sisl.__git_revision__)

$ ipython Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] Type ‘copyright’, ‘credits’ or ‘license’ for more information IPython 7.12.0 – An enhanced Interactive Python. Type ‘?’ for help.

In [1]: import sys …: print(sys.version) 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]

import sisl is not working yet.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:73 (31 by maintainers)

github_iconTop GitHub Comments

1reaction
zerothicommented, Aug 5, 2020

Great, thanks! I have added a small section in the installation procedure. 😃

0reactions
kovalpcommented, Dec 14, 2021

Thank you for the update. I will keep it in mind.

On Tue, Dec 14, 2021 at 2:45 PM Nick Papior @.***> wrote:

@kovalp https://github.com/kovalp the build system has been updated, and some details regarding numpy linking has been fixed, if you want to retry on your windows box it would be nice, I still don’t have a windows box to test on… 😦

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zerothi/sisl/issues/244#issuecomment-993557842, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAKSHC7FECAIFMQGYXT5RTUQ5DAFANCNFSM4PFSL5BQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation using MSYS2 and the MinGW Compilers
Launch the “MSYS MinGW 64-bit” option to use the MinGW 64bit toolchain, producing 64bit binaries that run on 64bit Windows systems. The “MSYS...
Read more >
Learn to install GCC (Mingw-w64) compiler tools on Windows ...
In this tutorial , We will learn How to install 64 bit (GCC) GNU Compiler Collection (Mingw-w64 port) on a Windows 10 system...
Read more >
MSYS2
MSYS2 provides up-to-date native builds for GCC, mingw-w64, CPython, CMake, Meson, OpenSSL, FFmpeg, Rust, Ruby, just to name a few. To provide easy...
Read more >
Install gcc compiler on Windows with MSYS2 for C/C++
In the MSYS2 bash shell, use pacman again to install the build toolchain and compilers. Run the command below to install the mingw-w64-x86_64- ......
Read more >
Learn to Install GCC (Mingw-w64) Compiler Tools on ...
1. What is Mingw-w64 What is MSYS2 Where to Download MSYS2 binary for Windows Installing MSYS2 on Windows Install GCC on Windows using Pacman Compiling C/C++ file on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found