lpy icon indicating copy to clipboard operation
lpy copied to clipboard

After conda installation, can't run lpy

Open siulkilulki opened this issue 7 years ago • 16 comments

I'm on linux. I have created conda enviroment with conda create -n lpy openalea.lpy -c openalea and activated it. Running lpy gives:

+(lpy) dawid@dawid-Swanky:~/gitrepos/mycelium2d$ lpy
Traceback (most recent call last):
  File "/home/dawid/miniconda3/envs/lpy/bin/lpy", line 11, in <module>
    load_entry_point('VPlants.Lpy==2.7.0', 'gui_scripts', 'lpy')()
  File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/__init__.py", line 572, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
    return ep.load()
  File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2408, in load
    return self.resolve()
  File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2414, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/VPlants.Lpy-2.7.0-py2.7-linux-x86_64.egg/openalea/lpy/__init__.py", line 2, in <module>
    from __lpy_kernel__ import *
ImportError: libboost_python.so.1.66.0: cannot open shared object file: No such file or directory

conda list prints that it installed libboost 1.65.1 habcd387_4 so I guess it just installed wrong version of libboost. I will try install libboost 1.66.0 manually and will tell you if it solves the problem.

siulkilulki avatar Mar 21 '18 10:03 siulkilulki

It seems you are on Linux, isn't it?

Remove your environment (conda remove -n lpy --all) and recreate it using the folloing command:

conda create -n lpy openalea.lpy openalea.plantgl 'boost =1.66.0' -c openalea

Le 21/03/2018 à 11:28, siulkilulki a écrit :

I'm on linux. I have created conda enviroment with |conda create -n lpy openalea.lpy -c openalea| and activated it. Running |lpy| gives:

|+(lpy) dawid@dawid-Swanky:~/gitrepos/mycelium2d$ lpy Traceback (most recent call last): File "/home/dawid/miniconda3/envs/lpy/bin/lpy", line 11, in load_entry_point('VPlants.Lpy==2.7.0', 'gui_scripts', 'lpy')() File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 572, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 2755, in load_entry_point return ep.load() File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 2408, in load return self.resolve() File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 2414, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/home/dawid/miniconda3/envs/lpy/lib/python2.7/site-packages/VPlants.Lpy-2.7.0-py2.7-linux-x86_64.egg/openalea/lpy/init.py", line 2, in from lpy_kernel import * ImportError: libboost_python.so.1.66.0: cannot open shared object file: No such file or directory |

|conda list| prints that it installed |libboost 1.65.1 habcd387_4| so I guess it just installed wrong version of libboost. I will try install |libboost 1.66.0| manually and will tell you if it solves the problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openalea/lpy/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEeSqRNnXxPgzFP5uAk7S6FWwLevqkyks5tgis0gaJpZM4SzURX.

pradal avatar Mar 21 '18 10:03 pradal

I have just run conda install boost=1.66.0 and it works now. (updated to 1.66) Anyway docs should be updated :)

Yes, I'm on Linux.

siulkilulki avatar Mar 21 '18 11:03 siulkilulki

Cool. There is a strange bug. The boost code is take from anaconda rather than openalea channel. Conda do not respect priority. We have to investigate why.

Where do you take the instructions?

Le 21/03/2018 à 12:15, siulkilulki a écrit :

I have just run |conda install boost=1.66.0| and it works now. (updated to 1.66) Anyway docs should be updated :)

Yes, I'm on Linux.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openalea/lpy/issues/12#issuecomment-374903892, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEeSqITi8_fdENgo8_cDExo5OL3eWvMks5tgjZpgaJpZM4SzURX.

pradal avatar Mar 21 '18 11:03 pradal

I took instructions from http://lpy.readthedocs.io/en/latest/user/installing.html#installing-using-conda-linux-mac-windows.

This is quick fix: conda create -n lpy openalea.lpy boost=1.66.0 -c openalea but it still not what we want, because other packages are still taken from openalea only when they are not found in other channels.

I have also tried conda config --add channels openalea && conda create -n lpy openalea.lpy --channel-priority which sets openalea as the default channel, but still boost is not taken from openalea.

Yea, so it's definitely a conda bug. I will submit an issue on conda github unless I'm the only one with such strange behavior. Am I?

edit: conda -V gives conda 4.5.0

siulkilulki avatar Mar 21 '18 23:03 siulkilulki

may be related to https://github.com/conda/conda/issues/6065 ?

christian34 avatar Mar 22 '18 07:03 christian34

Hey, I just wanted to chime in that I am having this issue as well. However, when I specifically install boost=1.66.0 I get the error ImportError: libboost_thread.so.1.65.1: cannot open shared object file: No such file or directory. So it seems like LPy is trying to use 1.66 and 1.65 simultaneously.

langmm avatar May 15 '18 19:05 langmm

The fix is to remove boost and py-boost and openalea.lpy. Then, you can reinstall them using the following command:

conda install -c openalea openalea.lpy boost=1.66 -y

pradal avatar May 15 '18 19:05 pradal

That worked for me on one of my linux dev machines and my osx laptop, but not a second linux machine. It looks like there is a conflict somewhere on my end so sorry for cluttering the comments.

On a somewhat related note which might be better placed elsewhere, I had tried building from source, but it looks like the SConscript file for the lpy wrapper dosn't include the qt path and so module.h couldn't find the QtCore/QtSharedData header. I was able to get scons to run by adding lib_env.EnableQtModules( [ 'QtCore']) to the wrapper SConscript file, but running python setup.py install caused a segfault.

I am not very familiar with scons, so perhaps I am missing something.

langmm avatar May 16 '18 00:05 langmm

No problem. Thank you for reporting your problems; It help us a lot.

First, you have a problem with a linux machine. What is your distribution? Do you have boost installed in the system (/usr/lib/...)? Can you send me the result of the command:

conda info --all

For building from source, the easiest way is to use (at the root dir):

conda build -c openalea conda/.

You may need to install conda-build in your root (or base) environment before:

conda install -n root conda-build

We can discuss later on how to build the source directly. Thanks again

pradal avatar May 16 '18 09:05 pradal

I am on ubuntu 14.04, but I dont think it is the linux flavor. I was eventually able to install LPy from conda on that machine after doing a full update of all conda packages and removing versions of some of the major packages lpy requires (qhull, cgal, boost, all openalea packages) that I had installed previously. Unfortunately I don't have a list of the packages from before to pinpoint which package was causing the issue. This even worked with two versions of boost installed (one installed via apt at the system level for another project). I have a suspicion that it might be the cgal package as I had also been using the eigen3 package from a non-standard channel that is probably out of date.

langmm avatar May 16 '18 18:05 langmm

On linux, after the installation of lpy following the previous advice concerning libboost 1.66, I have this error concerning the "sip module"

How can I fix it ?

Thks

NOT using graph editor observer No module named grapheditor Traceback (most recent call last): File "/home/dcombes/.conda/envs/lpy/bin/lpy", line 11, in load_entry_point('OpenAlea.Lpy==2.7.1', 'gui_scripts', 'lpy')() File "/home/dcombes/.conda/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 476, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/home/dcombes/.conda/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 2700, in load_entry_point return ep.load() File "/home/dcombes/.conda/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 2318, in load return self.resolve() File "/home/dcombes/.conda/envs/lpy/lib/python2.7/site-packages/pkg_resources/init.py", line 2324, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/home/dcombes/.conda/envs/lpy/lib/python2.7/site-packages/OpenAlea.Lpy-2.7.1-py2.7-linux-x86_64.egg/openalea/lpy/gui/lpystudio.py", line 18, in import PyQGLViewer File "/home/dcombes/.conda/envs/lpy/lib/python2.7/site-packages/PyQGLViewer.py", line 25, in from PyQGLViewerQt4 import * RuntimeError: the sip module implements API v11.0 but the PyQGLViewerQt4 module requires API v11.3

dicombes avatar Jun 13 '18 10:06 dicombes

Does this line solve the problem?: conda upgrade sip

pradal avatar Jun 13 '18 16:06 pradal

following error :+1: dcombes@ORL-JGSFG52:~$ conda upgrade sip

PackageNotInstalledError: Package is not installed in prefix. prefix: /home/dcombes/miniconda2 package name: sip

dicombes avatar Jun 13 '18 18:06 dicombes

Perhaps it uses a sip on your system and not in conda.

Just do:

conda install sip

Le 13/06/2018 à 20:12, dicombes a écrit :

following error 👍 dcombes@ORL-JGSFG52:~$ conda upgrade sip

PackageNotInstalledError: Package is not installed in prefix. prefix: /home/dcombes/miniconda2 package name: sip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openalea/lpy/issues/12#issuecomment-397034257, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEeSjCU-cNFuoUAhVkbKKPgC7wFvzlyks5t8VYGgaJpZM4SzURX.

pradal avatar Jun 13 '18 18:06 pradal

damned !!!

Permission denied !!!!

dicombes avatar Jun 13 '18 19:06 dicombes

Hello,

On linux (ubuntu 16.04 LTS) I had the same problem when importing openalea.plantgl: "libboost_python.so.1.66.0: cannot open shared object file: No such file or directory"

Worked for me when installing boost as: conda install boost=1.66.0 -c conda-forge

Regards !

Rami

RamiALBASHA avatar Jun 24 '18 16:06 RamiALBASHA