Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Galsim installation issue #1

Closed
sfarrens opened this issue Jan 18, 2021 · 3 comments
Closed

Galsim installation issue #1

sfarrens opened this issue Jan 18, 2021 · 3 comments
Assignees

Comments

@sfarrens
Copy link
Member

Hi @tobias-liaudat,

I have encountered an issue with the current Galsim installation used by MCCD.

MCCD Issue

When installing MCCD from PyPi,

pip install mccd

Galsim is installed via pip as a dependency. Then when attempting to verify the current version of MCCD,

python -c "import mccd; print(mccd.__version__)"

I get the following errors:

macOS

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/sfarrens/Documents/Library/miniconda3/envs/mccd/lib/python3.7/site-packages/mccd/__init__.py", line 11, in <module>
    from .mccd import MCCD, mccd_quickload
  File "/Users/sfarrens/Documents/Library/miniconda3/envs/mccd/lib/python3.7/site-packages/mccd/mccd.py", line 22, in <module>
    import galsim as gs
  File "/Users/sfarrens/Documents/Library/miniconda3/envs/mccd/lib/python3.7/site-packages/galsim/__init__.py", line 112, in <module>
    from .position import Position, PositionI, PositionD
  File "/Users/sfarrens/Documents/Library/miniconda3/envs/mccd/lib/python3.7/site-packages/galsim/position.py", line 19, in <module>
    from . import _galsim
ImportError: dlopen(/Users/sfarrens/Documents/Library/miniconda3/envs/mccd/lib/python3.7/site-packages/galsim/_galsim.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libgalsim.2.2.dylib
  Referenced from: /Users/sfarrens/Documents/Library/miniconda3/envs/mccd/lib/python3.7/site-packages/galsim/_galsim.cpython-37m-darwin.so
  Reason: image not found

CentOS Linux

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/sfarrens/.conda/envs/mccd/lib/python3.7/site-packages/mccd/__init__.py", line 11, in <module>
    from .mccd import MCCD, mccd_quickload
  File "/home/sfarrens/.conda/envs/mccd/lib/python3.7/site-packages/mccd/mccd.py", line 22, in <module>
    import galsim as gs
  File "/home/sfarrens/.conda/envs/mccd/lib/python3.7/site-packages/galsim/__init__.py", line 112, in <module>
    from .position import Position, PositionI, PositionD
  File "/home/sfarrens/.conda/envs/mccd/lib/python3.7/site-packages/galsim/position.py", line 19, in <module>
    from . import _galsim
ImportError: libgalsim.so.2.2: cannot open shared object file: No such file or directory

ShapePipe Issue

This also creates an issue for ShapePipe (in particular on Candide, which uses CentOS Linux). ShapePipe installs Galsim from conda-forge, which a) allows MCCD to work fine but b) creates a conflict between the two Galsim installations on certain systems.

Proposed Solution

I recommend removing Galsim from your requirements.txt and making an new release of MCCD. This will resolve the ShapePipe issues.

With regards to the stand-alone MCCD installation, I think you can include a note that MCCD requires Galsim but it would be better to install this from source or via Conda.

@tobias-liaudat tobias-liaudat self-assigned this Jan 18, 2021
@tobias-liaudat
Copy link
Member

Thanks @sfarrens I'll look at it and make a release to fix this issue and also #2

@tobias-liaudat
Copy link
Member

Once the issue in the ModOpt package is handled , so that I can solve the issue #2 I will make a new release.

@tobias-liaudat
Copy link
Member

This issue is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants