1

I have currently used the python Package Larch (https://pypi.python.org/pypi/larch) on Windows. It works nicely and I am really impressed with its performance. To use the package with some large models I want to install it on a Linux server (Ubuntu 14.04.4) where I do not have the root permissions. Though knowing that the OS requirements for the package are Window or MacOS and being a beginner with Linux, I still gave it a try.

I was able to install python locally using anaconda distribution but when I used pip to install larch, I got the following message

Could not find a version that satisfied the requirement larch (from version: ) No matching distribution found for larch

So it seems to me that I can not just deliberately try to install the package on linux with out any additional work. I then tried to find solutions for my issue but I could not find any. Therefore I would like to ask if there is any workaround for my problem?

Thank you so much for your help!

Kratos1808
  • 43
  • 6
  • I am having the same problem, is it solved for you? – Yijiao Liu Oct 22 '18 at 22:15
  • Hi Yijiao Liu. Sorry for my late reply. I did not know about your question and thus could not answer any sooner. I was not able to make Larch work on the Linux server and finally wrote my own code in tensorflow to estimate the models. – Kratos1808 Dec 10 '18 at 14:24
  • me neither, I tried but can not make it work on Linux server – Yijiao Liu Dec 10 '18 at 14:26

2 Answers2

1

[Edit]

larch does not support python2.x, and only support Windows, MACOSX.

For installing in Linux, I suggest to use wine to run windows python program with larch.

For more information about wine in Ubuntu. You can search with keyword such as How To Run Windows Software on Ubuntu with Wine


For installing in macosx. Making sure your environment have python3. You can use which python3 to check that.

$ which python3
/usr/local/bin/python3

Then, without root permission, you can install package via virtualenv. (A workstation should provide this command)

$ virtualenv -p $(which python3) env
$ . env/bin/activate
(env) $ python -V
Python 3.x.x

And finally, you can install larch via pip.

(env) $ pip3 install larch

For more information about virtualenv

Kir Chou
  • 2,980
  • 1
  • 36
  • 48
  • Hi Kir Chou! Thank you very much for your answer! I am using python 3.6. I will try to see if your solution works. – Kratos1808 May 17 '17 at 18:04
  • Hi Kir Chou, I did a little search to find out more about virtualenv and think that it is not the right solution for my problem. My default python is python 3.6. The pip that I used was the one that came with it. It seems to me that the code of larch was not written for linux platform. – Kratos1808 May 17 '17 at 18:43
  • I also tried to use your code snippet but I got the following error: Too many levels of symbolic links – Kratos1808 May 17 '17 at 18:46
  • I used python3.5.2 on macosx and it works well (I have installed larch just now), maybe it hasn't support 3.6 yet. Since you don't own the linux root, if python3.6 doesn't be supported, you need to ask the admin for lower python version. – Kir Chou May 17 '17 at 19:08
  • From this link: https://pypi.python.org/pypi/larch, apparently, it only support python3.4, 3.5. And os is only for macos and windows – Kir Chou May 17 '17 at 19:12
  • Hi Kir Chou, it works with python 3.6. I am using it on my windows work station :D. Yes, the os requirements are windows or macos as I described in my question and that why I try to find a workaround so that I can use it on linux :( – Kratos1808 May 17 '17 at 19:20
  • I have tried in CentOS with python3.6. It seems didn't work with pip. Then I also tried to install manually. Apparently there are lots incompatible source code in C. I personally think the only workaround is using service such as `wine` to run windows program in linux. – Kir Chou May 18 '17 at 07:45
  • Additionally, `larch` might not be a popular package which has less than 10 stars, however I still encourage you to discuss with the authors and make a new issue to request this feature on its github repo. – Kir Chou May 18 '17 at 07:47
  • Thank you very much for all your time and effort, Kir Chou! I truly appreciate it! I am thinking about wine and virtualbox as well. But I am trying to find out if those two software can be installed locally without the root permissions. You are right, larch is not so popular right now since it is used for a very specific purpose. But it is a really nice and powerful package :) – Kratos1808 May 18 '17 at 12:45
0

"Larch can be installed from source code. If not using Anaconda, this is necessary for Linux, and can be done for other systems as well.

The latest releases of the source code will be available from Larch releases (github.com). In addition, you can use git to grab the latest development version of the source code:git clone http://github.com/xraypy/xraylarch.git" After unpacking the source distribution kit, installation from source on any platform is:

python setup.py install

source:http://cars.uchicago.edu/xraylarch/installation/index.html
edit: See this for doing this without root access
How to install python modules without root access?

Community
  • 1
  • 1