Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After conda installation, can't run lpy #12

Open
siulkilulki opened this issue Mar 21, 2018 · 16 comments
Open

After conda installation, can't run lpy #12

siulkilulki opened this issue Mar 21, 2018 · 16 comments

Comments

@siulkilulki
Copy link

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.

@pradal
Copy link
Contributor

pradal commented Mar 21, 2018 via email

@siulkilulki
Copy link
Author

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.

@pradal
Copy link
Contributor

pradal commented Mar 21, 2018 via email

@siulkilulki
Copy link
Author

siulkilulki commented Mar 21, 2018

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

pradal added a commit that referenced this issue Mar 22, 2018
Fix #12: 
Update documentation on linux:
  - install openalea.lpy rather than vplants.lpy
  - update boost install to use the one provided by openalea channel and none the one on the default channel
@christian34
Copy link

may be related to conda/conda#6065 ?

@langmm
Copy link

langmm commented May 15, 2018

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.

@pradal
Copy link
Contributor

pradal commented May 15, 2018

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

@langmm
Copy link

langmm commented May 16, 2018

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.

@pradal
Copy link
Contributor

pradal commented May 16, 2018

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

@langmm
Copy link

langmm commented May 16, 2018

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.

@dicombes
Copy link

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

@pradal
Copy link
Contributor

pradal commented Jun 13, 2018

Does this line solve the problem?:
conda upgrade sip

@dicombes
Copy link

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

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

@pradal
Copy link
Contributor

pradal commented Jun 13, 2018 via email

@dicombes
Copy link

damned !!!

Permission denied !!!!

@RamiALBASHA
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants