gala
gala copied to clipboard
Updated Python not compatible with Gala?
Hi! I recently updated packages + Python and now I am having trouble installing Gala on a newly installed anaconda. I'm getting the following error when I run "pip install gala":
"note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for gala Failed to build gala ERROR: Could not build wheels for gala, which is required to install pyproject.toml-based projects"
I am also getting repeated errors like this:
**_Warning: Package 'gala.tests' is absent from the packages configuration.
!!
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'gala.tests' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'gala.tests' is explicitly added
to the `packages` configuration field.
Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
If you don't want 'gala.tests' to be distributed and are
already explicitly excluding 'gala.tests' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.
You can read more about "package data files" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************
!!
check.warn(importable)**
Not sure if this is something on my end or in gala!
👋 Thanks for reporting this!
Ah, interesting. This might be a bug with the new packaging setup I'm using. Can you try installing from source:
pip install git+https://github.com/adrn/gala
Of course! I tried that out but am sadly still receiving the following error:
ERROR: Could not build wheels for gala, which is required to install pyproject.toml-based projects
Thanks for your help!
Interesting -- this works for me on both MacOS 13.5 and on CentOS linux. What operating system are you on? What version of Python? And what version of pip?
python --version
pip --version
Hi! I've been testing out some other packages, too, and am realizing I'm getting similar errors so I'm wondering if it might not be a Gala thing! I'm on Windows 11 and python version 3.11.4 and pip version 23.2.1
Ah, yes, Gala does not install on Windows because of the C compiler (MSVC), but what's confusing me is that the error you are getting sounds like it is a packaging error and not related to compilation. Hmm...
For others using Windows, I have recommended using the "Windows Subsystem for Linux" to install Gala.
I see!! Yeah, that is odd. It's also weird because I've had it installed for a couple years at an earlier version of Python so I'm not sure why now that I've updated things it's stopped working!!
I've used Windows Subsystem for Linux in the past and maybe can try that. Is there an alternative method I can also try related to the C compiler?
I'll see if I can get the latest version of Gala to compile on Windows, but I've been unsuccessful in the past. I'll let you know after I take a look at this!
Hello again! I managed to get the download to work by downgrading my Python version in a new environment, but am now getting the following error.
`
ImportError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_10544\2443860891.py in
~\anaconda3\envs\galaenv\lib\site-packages\gala_init_.py in
~\anaconda3\envs\galaenv\lib\site-packages\gala\dynamics_init_.py in
~\anaconda3\envs\galaenv\lib\site-packages\gala\dynamics\analyticactionangle.py in
~\anaconda3\envs\galaenv\lib\site-packages\gala\potential_init_.py in
~\anaconda3\envs\galaenv\lib\site-packages\gala\potential\potential_init_.py in
ImportError: DLL load failed: The specified module could not be found. `
Not sure if you have seen this before or what could potentially be causing this. Thank you in advance!
Hi, I am facing the same issue, is there any way to install the package on Windows?
@SlimakSlimak I got it to work by using Windows Subsystem for Linux! You can find a lot of tutorials on how to install it (eg. this one from Microsoft: https://learn.microsoft.com/en-us/windows/wsl/install). Then, you can pip install Gala in there (you have to run it through Ubuntu or something else - also weirdly, with WSL, I need to open up the Ubuntu notebook first every time I open my computer before opening my Anaconda (Windows) otherwise it doesn't work).
It worked for me!