Does pynbody support Windows?

42 views
Skip to first unread message

Stefan Lloyd

unread,
Jul 30, 2022, 7:24:01 AM7/30/22
to pynbody-users
Has anyone successfully installed pynbody on Windows? I can't find a statement that it either is or is not supported? A search on "Windows" in this group draws a blank.

My basic setup is Windows 10, Anaconda, Python 3.10 (virtual environment). Microsoft Visual Studio\2022 is installed and working.

My first problem was that setup.py line 26 checks environment variable CC and that isn't typically set in a Visual Studio setup. I set it and got a bit further with the pynbody installation.

I'm now stuck installing the posix_ipc dependency. The failing line is:

posix_ipc_module.c(37): fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 

and the same happens if I attempt to install it directly with pip install. It isn't a conda package.

Apparently: "<sys/time.h> is a POSIX header, not part of the C/C++ standard library. If you are using C++ the standard header is <ctime>" https://stackoverflow.com/questions/25615571/how-to-use-sys-time-h-in-windows

According to http://semanchuk.com/philip/posix_ipc/ the module works in Windows, however various people report the same issue as mine installing in Windows and I have not found any specific suggested workarounds.

I don't have a Linux environment to hand, I could get one but it involves spending money.

Can pynbody be installed in Windows and if so, how? Any help appreciated.



 

Pontzen, Andrew

unread,
Jul 30, 2022, 7:26:14 AM7/30/22
to pynbody-users
Hi Stefan,

It’s not supported under native windows, sorry. None of the developers use windows, so we don’t have a pathway to this.

But you can install WSL on windows 10 free of charge, see here: https://docs.microsoft.com/en-us/windows/wsl/install

Several people have had success using pynbody under WSL.

All the best,

Andrew


--
You received this message because you are subscribed to the Google Groups "pynbody-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynbody-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynbody-users/f757bbce-41ac-4107-acfc-be495712caacn%40googlegroups.com.

Stefan Lloyd

unread,
Jul 30, 2022, 7:50:41 AM7/30/22
to pynbody-users
Thanks for the quick reply, I thought that might be the case. Thanks also for the WSL suggestion, I may go that route.
Reply all
Reply to author
Forward
0 new messages