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

Problem installing apstools #495

Closed
gfabbris opened this issue Feb 9, 2021 · 6 comments · Fixed by #505
Closed

Problem installing apstools #495

gfabbris opened this issue Feb 9, 2021 · 6 comments · Fixed by #505
Assignees
Labels
Milestone

Comments

@gfabbris
Copy link
Collaborator

gfabbris commented Feb 9, 2021

I could not install apstools=1.4.1 in my computer through conda. Then I cloned it, and tried to create a fresh environment for it using conda env create -f environment.yml, this also failed (it reported a horrible list of conflicts). It turns out the source of the conflicts seem to be hklpy. I removed it from "environment.yml", and it installed fine. Then:

$ conda activate apstoolsdoc
$ conda install -c nsls2forge hklpy
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                                                                            

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Same happens if I do $ conda install -c aps-anl-tag apstools.

@gfabbris
Copy link
Collaborator Author

gfabbris commented Feb 9, 2021

The issue seems to be that the hkl package is for linux only. This breaks the hklpy, and then apstools, installation.

@prjemian
Copy link
Contributor

prjemian commented Feb 9, 2021

I was running into this yesterday for 30-ID. Had to explicitly install gobject-instrospection (needed by hklpy).

@gfabbris
Copy link
Collaborator Author

gfabbris commented Feb 9, 2021

Just for some background, I was trying to install it in my Macbook. I installed gobject-instrospection, and doesn't work. I tried installing it in a linux and it worked fine. So I think the problem is really the dependency on the hkl package (https://anaconda.org/nsls2forge/hkl).

apstools will mostly be used at the beamlines, so this should be fine. But we could add some warning that hkl is not required, but needed to use apstools.diffractometer.

@prjemian
Copy link
Contributor

prjemian commented Feb 9, 2021

Definitely will need the underlying compiled hkl C++ library to be installed by some mechanism. It's only compiled for linux in the conda package. Compilation process is more tedious than many packages.

@prjemian prjemian added this to the 1.4.2 milestone Mar 18, 2021
@prjemian prjemian added the bug label Mar 18, 2021
@prjemian prjemian self-assigned this Mar 18, 2021
@prjemian
Copy link
Contributor

Since all the diffractometer support is planned to move into hklpy, that dependency can be removed once the code is moved.

If the code is removed now, then the hklpy addition will need to retrieve the code from the 1.4.1 release here.

@prjemian
Copy link
Contributor

(base) prjemian@zap:~/.../BCDA-APS/apstools$ git grep hkl
README.md:* https://github.com/bluesky/hklpy
apstools/diffractometer.py:gi.require_version("Hkl", "5.0")  # MUST come before `import hkl`
apstools/diffractometer.py:    from hkl.geometries import E4CV, E6C, K4CV, K6C
apstools/diffractometer.py:    from hkl.diffract import E4CV, E6C, K4CV, K6C
apstools/diffractometer.py:    h = Component(PseudoSingle, "", labels=("hkl",), kind="hinted")
apstools/diffractometer.py:    k = Component(PseudoSingle, "", labels=("hkl",), kind="hinted")
apstools/diffractometer.py:    l = Component(PseudoSingle, "", labels=("hkl",), kind="hinted")
apstools/diffractometer.py:        return table of computed solutions for each (hkl) in the supplied reflections list
apstools/diffractometer.py:        _table.labels = "(hkl) solution".split() + list(motors)
apstools/diffractometer.py:                h, k, l = ref.hkl_get()
apstools/diffractometer.py:                    (f"ref {i+1} (hkl)", Package(**dict(h=h, k=k, l=l)))
apstools/diffractometer.py:            calc engine           hkl
docs/source/install.rst:  - bluesky, databroker, ophyd, hklpy
docs/source/source/_diffractometer.rst:        h = Component(PseudoSingle, '', labels=("hkl", "fourc"))
docs/source/source/_diffractometer.rst:        k = Component(PseudoSingle, '', labels=("hkl", "fourc"))
docs/source/source/_diffractometer.rst:        l = Component(PseudoSingle, '', labels=("hkl", "fourc"))
docs/source/source/_diffractometer.rst:the motor locations of an *(hkl)* reflection may be computed.
docs/source/source/_diffractometer.rst:    (hkl)       solution omega    chi       phi       tth
docs/source/source/_diffractometer.rst:    (hkl)       solution omega   chi       phi       tth
docs/source/source/_diffractometer.rst:    (hkl)       solution omega      chi        phi       tth
environment.yml:  - hklpy
tests/test_diffractometer.py:gi.require_version("Hkl", "5.0")  # MUST come before `import hkl`
tests/test_diffractometer.py:import hkl.diffract
tests/test_diffractometer.py:class MyE4CV(APS_diffractometer.DiffractometerMixin, hkl.diffract.E4CV):
tests/test_diffractometer.py:    #         "calc engine           hkl                                                                            ",
tests/test_diffractometer.py:    #         "                      ref 1 (hkl)       h=1.0, k=1.0, l=0.0                                          ",
tests/test_diffractometer.py:    #         "                      ref 2 (hkl)       h=0.0, k=1.0, l=0.0                                          ",
tests/test_diffractometer.py:    #         "calc engine           hkl                ",
tests/test_diffractometer.py:            "(hkl)       solution omega    chi      phi      tth      ",
tests/test_diffractometer.py:    #         "calc engine           hkl                         ",
tests/test_diffractometer.py:    #         "calc engine           hkl                ",
tests/test_diffractometer.py:    #         "calc engine           hkl                         ",

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

Successfully merging a pull request may close this issue.

2 participants