lmfit installation with Python 3.4.3

231 views
Skip to first unread message

Marc S

unread,
Sep 20, 2016, 9:38:25 AM9/20/16
to lmfit-py
Hello everyone,

I'm trying to install lmfit on a x86_64 GNU/Linux with Python 3.4.3 and I failed with two differents methods:  through Anaconda and pip. Maybe because of conflicts between packages and/or permission issue (details are below).
Does anyone have an idea on how I could fix that ?


$ conda install -c conda-forge lmfit    => Here ok, no problem
...
$ conda install -c newville lmfit
Fetching package metadata: ......
Solving package specifications: ..
Error: Unsatisfiable package specifications.
Generating hint:
[                    ]|                                                                                                                                               |   0%

Hint: the following packages conflict with each other:
  - lmfit
  - python 3.4*



$ pip install lmfit
You are using pip version 7.0.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting lmfit
  Using cached lmfit-0.9.5-py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): scipy in /opt/anaconda3-2.2.0-2ipsl/lib/python3.4/site-packages (from lmfit)
Requirement already satisfied (use --upgrade to upgrade): numpy in /opt/anaconda3-2.2.0-2ipsl/lib/python3.4/site-packages (from lmfit)
Installing collected packages: lmfit
Exception:
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/commands/install.py", line 297, in run
    root=options.root_path,
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/req/req_set.py", line 622, in install
    **kwargs
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/req/req_install.py", line 808, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/req/req_install.py", line 1003, in move_wheel_files
    isolated=self.isolated,
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/wheel.py", line 338, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/wheel.py", line 309, in clobber
    ensure_dir(destdir)
  File "/opt/anaconda3/lib/python3.4/site-packages/pip/utils/__init__.py", line 70, in ensure_dir
    os.makedirs(path)
  File "/opt/anaconda3/lib/python3.4/os.py", line 237, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/opt/anaconda3/lib/python3.4/site-packages/lmfit'


Best regards,
Marc

Antonino Ingargiola

unread,
Sep 20, 2016, 12:50:26 PM9/20/16
to lmfi...@googlegroups.com
Hi Marc,

On Tue, Sep 20, 2016 at 3:38 PM, Marc S <marcst...@gmail.com> wrote:
Hello everyone,

I'm trying to install lmfit on a x86_64 GNU/Linux with Python 3.4.3 and I failed with two differents methods:  through Anaconda and pip. Maybe because of conflicts between packages and/or permission issue (details are below).
Does anyone have an idea on how I could fix that ?


$ conda install -c conda-forge lmfit    => Here ok, no problem

So why going further. This is the preferred way to install lmfit and dependencies. If it works stick with it.

$ conda install -c newville lmfit
Fetching package metadata: ......
Solving package specifications: ..
Error: Unsatisfiable package specifications.
Generating hint:
[                    ]|                                                                                                                                               |   0%

Hint: the following packages conflict with each other:
  - lmfit
  - python 3.4*

Seems like in the newville conda channel there is not package for lmfit for python 3.4. Again, use conda-forge :).
This is probably due to the fact you installed Anaconda in a system-wide location and you user does not have write privilege there (it should be able to rw in /opt/anaconda3 and all subfolders).

Keep in mind that It is more common to install anaconda in your user folder though.
 
Antonio

Matt Newville

unread,
Sep 20, 2016, 1:05:11 PM9/20/16
to lmfit-py
Hi

On Tue, Sep 20, 2016 at 11:50 AM, Antonino Ingargiola <trit...@gmail.com> wrote:
Hi Marc,

On Tue, Sep 20, 2016 at 3:38 PM, Marc S <marcst...@gmail.com> wrote:
Hello everyone,

I'm trying to install lmfit on a x86_64 GNU/Linux with Python 3.4.3 and I failed with two differents methods:  through Anaconda and pip. Maybe because of conflicts between packages and/or permission issue (details are below).
Does anyone have an idea on how I could fix that ?


$ conda install -c conda-forge lmfit    => Here ok, no problem

So why going further. This is the preferred way to install lmfit and dependencies. If it works stick with it.

$ conda install -c newville lmfit
Fetching package metadata: ......
Solving package specifications: ..
Error: Unsatisfiable package specifications.
Generating hint:
[                    ]|                                                                                                                                               |   0%

Hint: the following packages conflict with each other:
  - lmfit
  - python 3.4*

Seems like in the newville conda channel there is not package for lmfit for python 3.4. Again, use conda-forge :).


Yes, I agree with Antonio.  The newville conda channel does not provide lmfit for python 3.4, but conda-forge does.  


Adding conda-forge as preferred default channel is definitely a good idea. It has lots of packages that are not in the official distribution, and they are very good at keeping packages up to date.

You may need to use 'sudo' or somehow elevate the privileges. 
Still, I don't know how one would construct a situation where 'pip' needed 'sudo' and 'conda' did not.
Are those both from the same anaconda installation?
 
This is probably due to the fact you installed Anaconda in a system-wide location and you user does not have write privilege there (it should be able to rw in /opt/anaconda3 and all subfolders).

Keep in mind that It is more common to install anaconda in your user folder though.
 

Yeah, for me, the main attraction of anaconda is that installs in a users home folder and so does not need elevated permissions to install packages.  It has a nice package manager too ;).

--Matt

Antonino Ingargiola

unread,
Sep 20, 2016, 1:13:36 PM9/20/16
to lmfi...@googlegroups.com
Hi Matt,

On Tue, Sep 20, 2016 at 7:04 PM, Matt Newville <newv...@cars.uchicago.edu> wrote:

Adding conda-forge as preferred default channel is definitely a good idea. It has lots of packages that are not in the official distribution, and they are very good at keeping packages up to date.


while we are at it I want to share a little trick. If you add conda-forge to your list of default channels add it in .condarc after the default channel. In this way anaconda default channel packages will have priority and you avoid accidentally updating packages like numpy that are faster in the default channel (because they use MKL).

Note that you have to manually edit .condarc to do that. The command to add default channels will always add channel at the top of the list (I have seen an issue on github requesting to add an option to override this behaviour).

Antonio

Marc Stéfanon

unread,
Sep 20, 2016, 3:44:31 PM9/20/16
to lmfi...@googlegroups.com
Thank you Antonio ! I do not know why, but I was thinking that the first line with conda-forge was only for some kind of pre-requisite.

Marc

--
You received this message because you are subscribed to a topic in the Google Groups "lmfit-py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lmfit-py/Ao-bl03L1YU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lmfit-py+unsubscribe@googlegroups.com.
To post to this group, send email to lmfi...@googlegroups.com.
Visit this group at https://groups.google.com/group/lmfit-py.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/CANn2QUwk4Y0ut5tGbrSqoikLXC79LHfCAV%3D%3D5AnR1ioToN9DVQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages