Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
https://pyautogalaxy.readthedocs.io/
MIT License
28 stars 14 forks source link

Installation instructions for PyAutoGalaxy do not work #181

Closed pedro-acunha closed 4 months ago

pedro-acunha commented 4 months ago

Description:

I encountered issues while following the current installation instructions for PyAutoGalaxy. The steps provided in the documentation did not work as expected. After troubleshooting, an alternative method that successfully installed PyAutoGalaxy was found.

Steps to Reproduce:

  1. Follow the current installation instructions as provided in the documentation.
  2. Attempt to install PyAutoGalaxy using the specified commands.
  3. Running example notebook.

Expected Result: PyAutoGalaxy should be run without any errors.

Actual Result: The installation is successful, running the examples failed with various errors.

Solution: I was able to successfully install and run PyAutoGalaxy after using the following steps:

conda create -n pyautogalaxy python=3.11
conda activate pyautogalaxy
pip install --upgrade pip
pip install autogalaxy --no-cache-dir
pip install numba --no-cache-dir

Steps Taken:

  1. Created a new conda environment with Python 3.11.
  2. Activated the newly created environment.
  3. Upgraded pip to the latest version.
  4. Installed autogalaxy using pip with the --no-cache-dir option to avoid caching issues.
  5. Installed numba using pip with the --no-cache-dir option.

Request: Please update the installation instructions in the documentation to reflect the above steps or provide alternative troubleshooting steps for users who encounter similar issues.

Environment:

Thank you for your attention.

Additional Context: Examples of error messages and conflicts:

AttributeError: 'Parameter' object has no attribute 'clone'
AttributeError: module 'numpy' has no attribute 'long'
Jammy2211 commented 4 months ago

Thank you for the info.

Do you know what step in your instructions is different to this example?

https://pyautogalaxy.readthedocs.io/en/latest/installation/conda.html

They look identical to me, except that you are using --no-cache-dir which doesn't feel like it should matter.

pedro-acunha commented 4 months ago

Hi @Jammy2211,

The main difference lies in the --no-cache-dir, setting the python version to 3.11, and not doing conda create -n autogalaxy astropy scikit-image scikit-learn scipy. By creating the env and then running pip install autogalaxy allows for conflicts to be solved. In my previous message I posted some of the AtributeErrors that was shown when trying to run the example notebooks. I believe that by using --no-cache-dir it helps to avoid cache-related issues, specially if different package versions are requested, probably created when the requested packages are installed, alongside with the new env.

This came around after multiple people tried to install PyAutoGalaxy and we were stuck with AttributeErrors. It is probably not the most elegant one...

Jammy2211 commented 4 months ago

Ok thanks, I'll try doing some installs via conda and update the installation instructions!

Jammy2211 commented 4 months ago

I have updated the docs based on your suggestions :).

The docs themselves are not currently building due to some other error, but I'll close this.