[Ifeffit] LARCH installation issue in UBUNTU 18

Uma Mahendra Kumar K umamahendra at vit.ac.in
Sat Dec 8 22:48:45 CST 2018


On 05/12/18 9:54 PM, Matt Newville wrote:
Hi Mahendra,

On Wed, Dec 5, 2018 at 6:28 AM Uma Mahendra Kumar K <umamahendra at vit.ac.in<mailto:umamahendra at vit.ac.in>> wrote:

Dear All,

              I wanted to install LARCH on Ubuntu 18. And I could not.

I have tried several methods  (miniconda, Anaconda, from source and the Linux Binaries and even through pip).

 For several issues , I found answers in Ifeffit mailing list. This is new.

lmfit is not able to import 'ufloat'.

Actually "ufloat" belongs to "uncertainties". I could not able to link(port) them properly.

I need your help to install Larch.

the following is the error message

Traceback (most recent call last):
  File "/usr/local/bin/larch", line 58, in <module>
    import larch
  File "/root/.local/lib/python2.7/site-packages/larch/__init__.py", line 25, in <module>
    from .shell import shell
  File "/root/.local/lib/python2.7/site-packages/larch/shell.py", line 10, in <module>
    from .interpreter import Interpreter
  File "/root/.local/lib/python2.7/site-packages/larch/interpreter.py", line 18, in <module>
    from . import builtins
  File "/root/.local/lib/python2.7/site-packages/larch/builtins.py", line 22, in <module>
    from . import fitting
  File "/root/.local/lib/python2.7/site-packages/larch/fitting/__init__.py", line 20, in <module>
    from lmfit import (Parameter, Parameters, Minimizer, conf_interval,
ImportError: cannot import name ufloat


Oh, very sorry for the trouble.  That is totally my fault, and something I realize is not very well tested.   Basically, lmfit (which I am at least partly responsible for) had a new release (0.9.12) that breaks larch 0.9.40, in exactly this place.  The unreleased, development version of larch does work with the latest version (so all the tests say everything is fine).   I'm working on getting 0.9.41 released soon (hopefully next week), but that doesn't solve the problem for you now.

The first thing to try is:
       pip install lmfit==0.9.11

I think that *should* work.  If there are still problems, I would forcibly remove .../python2.7/site-packages/lmfit* and then install lmfit version 0.9.11.

As an aside, I might recommend using a version of Python that is not installed as root and in the /root/.local.    That seems slightly dangerous to me.

Hope that helps,

--Matt


Dear Dr Matt,

                    Finally I have fully functional larch on my ubuntu 18.04.

First I installed conda.

Then installed all the larch dependencies listed in the larch web-page via conda.

Later, xraylarch-0.9.40-Linux-x86_64.sh was installed using bash.

As you suggested i have forced lmfit==0.9.11, installation went very well and i got functional larch.


Thanks

Mahendra

VIT university-Bharat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://millenia.cars.aps.anl.gov/pipermail/ifeffit/attachments/20181209/6be8bca2/attachment.html>


More information about the Ifeffit mailing list