Hi Stefan, 

Oh, that's odd,  WxPython must have been installed for anything to have worked before.  But maybe it got removed during an Anaconda upgrade (I'm not sure of that, but maybe...)   I suggest trying   `conda install -c conda-forge wxpython` 

On Tue, Mar 16, 2021 at 1:57 AM Mangold, Stefan (IPS) <stefan.mangold@kit.edu> wrote:
Hi Matt,

here is the output. I work directly on this machine and not via remote login

bash-3.2$ xas_viewer
Traceback (most recent call last):
  File "/Users/myloginname/opt/anaconda3/bin/xas_viewer", line 8, in <module>
    sys.exit(run_xas_viewer())
  File "/Users/myloginname/opt/anaconda3/lib/python3.8/site-packages/larch/apps.py", line 146, in run_xas_viewer
    from larch.wxxas import XASViewer
  File "/Users/myloginname/opt/anaconda3/lib/python3.8/site-packages/larch/wxxas/__init__.py", line 1, in <module>
    from .taskpanel  import TaskPanel, FONTSIZE
  File "/Users/myloginname/opt/anaconda3/lib/python3.8/site-packages/larch/wxxas/taskpanel.py", line 10, in <module>
    import wx
ModuleNotFoundError: No module named ‚wx‘




Am 16.03.2021 um 03:23 schrieb Matt Newville <newville@cars.uchicago.edu>:

Hi Stefan,


Sorry, my earlier suggestions were automatically for Windows.  On MacOS, it would be pretty similar, but "open a Terminal" and then make sure that /Users/USERNAME/xraylarch exists and is in your path.  

To launch xas_viewer, you *should* be able to do

     %>  xas_viewer

but you might need (note "pythonw", not "python"!)
  
     %> pythonw ~/xraylarch/bin/xas_viewer

The rest of the advice is basically the same:  try to do a conda update and/or report what error messages you get.

On MacOS, if you get

     This program needs access to the screen. Please run with a Framework build of python, 
     and only when you are logged in on the main display of your Mac.
then you need to make sure you're running with "pythonw", not "python".



On Mon, Mar 15, 2021 at 5:32 PM Matt Newville <newville@cars.uchicago.edu> wrote:
Hi Stefan,

Sorry for the trouble.  It's always a little tricky to diagnose a problem of "it doesn't work", but here are a couple of things to try:

If you can open the Anaconda Prompt (from Start Menu it may be under "Anaconda3 (64-bit) and then "Anaconda Prompt (xraylarch)") where you ran 'larch -m" from, try running

    C:>   xas_viewer

That is supposed to run, but I suspect that it might print out some error messages.  If I had to guess, some package is not correctly installed.

Second, it might be helpful just to run (from the same prompt):

    C:> conda update --all


and see if that installs some updates or spins forever.  If it finishes, then try running "xas_viewer" again.

Third, you could just try reinstalling from scratch.  That might be "easiest", but if you have the patience to try the other approaches above it would help identify what the problem is.

--Matt


On Mon, Mar 15, 2021 at 7:59 AM Mangold, Stefan (IPS) <stefan.mangold@kit.edu> wrote:
Thanks Matt,

installation worked. But still have the problem, that I can’t start XAS Viewer. I executed also larch -m (no error message).

regards

Stefan

Am 13.03.2021 um 16:35 schrieb Matt Newville <newville@cars.uchicago.edu>:

Hi Stefan, Morgane, All, 

Yeah, sorry for the trouble with this.   I should admit I've had increasing struggles over the past year or two with maintaining packages for Anaconda Python, running into many painful claims of incompatible packages.    Most of the "core scientific python packages" are well-maintained by Anaconda.com -- it's hard to complain about this free distribution and all of the work that goes into it.   But the "non-Anaconda-provided" packages make Larch more complicated, and the xraylarch "conda" package is out-of-date.

The semi-good news on this front is that almost everything, including Larch, is actually available from the PyPI packaging system and can be installed with "pip".  Anaconda and its "conda" package-manager will regularly say to not mix "conda" and "pip", but this mostly applies to cases where C code is going to be compiled on installation, which we don't do.

What I'm now doing for building the binary distributions, and what I recommend for updating is:
   1. install a basic Anaconda distribution - this can be from the Larch binary installers.
   2. install or update the Larch code with  "pip install --upgrade xraylarch". 

I should probably take another look at adding xraylarch to the large-and-diverse "conda_forge" channel for the "conda" system.    

Hope that helps, and suggestions on how to handle this better would be most welcome,

--Matt
 

On Fri, Mar 12, 2021 at 10:07 AM Morgane Desmau <morgane.desmau@gmail.com> wrote:
Hello,

I already had this issue and it was related to the python version (6/7 months ago with python 3.8, and then it worked with Python 3.7, but I was thinking it was fixed since).

Best,
Morgane Desmau

Le ven. 12 mars 2021 à 16:55, Mangold, Stefan (IPS) <stefan.mangold@kit.edu> a écrit :
Dear all,

I tried to reinstall; before I updated and couldn’t open larch anymore


conda install -yc GSECARS xraylarch
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:


_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


--
--Matt Newville <newville at cars.uchicago.edu> 630-327-7411
_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit

_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


--
--Matt Newville <newville at cars.uchicago.edu> 630-327-7411


--
--Matt Newville <newville at cars.uchicago.edu> 630-327-7411
_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit

_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


--
--Matt Newville <newville at cars.uchicago.edu> 630-327-7411