DiamondLightSource / SuRVoS

(Su)per (R)egion (Vo)lume (S)egmentaton workbench
Apache License 2.0
25 stars 5 forks source link

failure to install on ubuntu (18.04) #37

Closed jewettaij closed 6 years ago

jewettaij commented 6 years ago

I opened a new issue (#36) to report problems with scikit-tensor. If I work-around those issues, I run into other problems when attempting to install on ubuntu. I'm currently using ubuntu18.04, but I think the same problems would occur in earlier versions of ubuntu. There are a list of problems. Some of them are probably not strictly related to ubuntu. I was able to solve some of them. Here they are in order:

1) In ubuntu there is no "/usr/lib64" directory. I was able to get past this problem (in ubuntu at least), by editing the "survos/build.py" file, and change line 39 of that file from: 'lib64': os.path.join(home, 'lib64') to: 'lib64': os.path.join(home, 'lib') This enabled me to compile SuRVoS (yay)

When attempting to run ./SuRVoS, I ran into the following: 2) "ImportError: No module named h5py" This is easily fixed using "pip install h5py"

3) During the process of importing "h5py", I ran into this error: "ImportError: No module named sip"

At this point, I ran out of stamina. Giving up for now. Hope this helps someone.

srikanthnagella commented 6 years ago

Use the pyqt5 branch. that should solve the issues.

On Sat, Mar 24, 2018 at 3:40 AM, Andrew Jewett notifications@github.com wrote:

I opened a new issue (#36 https://github.com/DiamondLightSource/SuRVoS/issues/36) to report problems with scikit-tensor. If I work-around those issues, I run into other problems when attempting to install on ubuntu. I'm currently using ubuntu18.04, but I think the same problems would occur in earlier versions of ubuntu. There are a list of problems. Some of them are probably not strictly related to ubuntu. I was able to solve some of them. Here they are in order:

  1. In ubuntu there is no "/usr/lib64" directory. I was able to get past this problem (in ubuntu at least), by editing the "survos/build.py" file, and change line 39 of that file from: 'lib64': os.path.join(home, 'lib64') to: 'lib64': os.path.join(home, 'lib') This enabled me to compile SuRVoS (yay)

When attempting to run ./SuRVoS, I ran into the following: 2) "ImportError: No module named h5py" This is easily fixed using "pip install h5py"

  1. During the process of importing "h5py", I ran into this error: "ImportError: No module named sip"

At this point, I ran out of stamina. Giving up for now. Hope this helps someone.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DiamondLightSource/SuRVoS/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/AAovcVXO1TmSv-nIPX0hFhRkHTZF_ZwNks5thcAmgaJpZM4S5lib .

srikanthnagella commented 6 years ago

even better way to install is using conda. It is available on ccpi channel. "conda install -c ccpi -c conda-forge -c numba survos"

On Sat, Mar 24, 2018 at 3:43 AM, Srikanth Nagella srikanthnag@gmail.com wrote:

Use the pyqt5 branch. that should solve the issues.

On Sat, Mar 24, 2018 at 3:40 AM, Andrew Jewett notifications@github.com wrote:

I opened a new issue (#36 https://github.com/DiamondLightSource/SuRVoS/issues/36) to report problems with scikit-tensor. If I work-around those issues, I run into other problems when attempting to install on ubuntu. I'm currently using ubuntu18.04, but I think the same problems would occur in earlier versions of ubuntu. There are a list of problems. Some of them are probably not strictly related to ubuntu. I was able to solve some of them. Here they are in order:

  1. In ubuntu there is no "/usr/lib64" directory. I was able to get past this problem (in ubuntu at least), by editing the "survos/build.py" file, and change line 39 of that file from: 'lib64': os.path.join(home, 'lib64') to: 'lib64': os.path.join(home, 'lib') This enabled me to compile SuRVoS (yay)

When attempting to run ./SuRVoS, I ran into the following: 2) "ImportError: No module named h5py" This is easily fixed using "pip install h5py"

  1. During the process of importing "h5py", I ran into this error: "ImportError: No module named sip"

At this point, I ran out of stamina. Giving up for now. Hope this helps someone.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DiamondLightSource/SuRVoS/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/AAovcVXO1TmSv-nIPX0hFhRkHTZF_ZwNks5thcAmgaJpZM4S5lib .

jewettaij commented 6 years ago

Hi Srikanth Alas, scikit-tensor fails to install in conda, for me at least. The error I get is: "pkg_resources.DistributionNotFound: The 'nose' distribution was not found and is required by the application."

jewettaij commented 6 years ago

Ill try the pyqt branch now.

vais-ral commented 6 years ago

"conda install -c ccpi -c conda-forge -c numba survos" this doesn't depend on scikit-tensor.

jewettaij commented 6 years ago

Thanks vais-ral. I'll try using conda tomorrow. Got to get home now. Meanwhile, regarding the pyqt5 branch (pip), I ran into the following warnings and errors (using python3. python2 is not compatible): Please put "# distutils: language=c++" in your .pyx or .pxd file(s) /usr/bin/ld: cannot find -lsurvos_cuda creating build/lib.linux-x86_64-3.6/survos/lib long list of libraries... collect2: error: ld returned 1 exit status error: command 'x86_64-linux-gnu-g++' failed with exit status 1

I'm giving up for this evening. Thanks for the help. -Andrew

srikanthnagella commented 6 years ago

you need to install cuda on the system and add it to your path. It was tested on centos 6 and 7. i will try on ubuntu and let you know.

srikanthnagella commented 6 years ago

I have tried on 18.04 using conda installation from ccpi channel and it worked. You can build it manually from the pyqt5 code branch. the instructions are 1) Install nvidia-cuda-toolkit 2) Install Anaconda 3) clone the source code and switch to pyqt5 4) conda build conda-recipe -c conda-forge -c numba 5) conda install --use-local -c conda-forge -c numba survos

jewettaij commented 6 years ago

Okay. Finally got a chance to play with conda. (and debug lots of stuff. Conda's version of python hates my code.) It seems as though steps 1-4 went smoothly. (There was a message: "anaconda_upload is not set. Not uploading wheels: []". Ignoring that.)

In step 5 (conda install survos), I ran into a snag:

Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels: 
survos

This seems like a beginner mistake. I'm new to conda. Any advice how to proceed?

srikanthnagella commented 6 years ago

Step 5 is conda install --use-local -c conda-forge -c numba survos

jewettaij commented 6 years ago

Sigh (PEBCAK) I can verify that this procedure (1-5) runs without generating any error messages (ubuntu 18.04, CUDA 9.1) However the documentation at the end of the web page below, suggests that there is an executable named "SuRVoS" somewhere which will bring up the GUI. https://diamondlightsource.github.io/SuRVoS/docs/installation/ (This documentation really needs to be updated.) I am noticing that the procedure above (steps 1-5) does not generate this file. It does however create a python module. ("import survos" works in python.) Does the pyqt5 GUI need to be launched from within an Ipython/jupyter-like interpreter?

jewettaij commented 6 years ago

Okay, I figured it out. This seems to work:

python survos/survos/launcher/survos_launcher.py

I will close this issue as soon as the 'pyqt5' branch is merged and the documentation is updated. Thank you very much for getting this 'pyqt5' branch working and answering my questions. -Andrew

srikanthnagella commented 6 years ago

SuRVoS executable will be in AnacondaInstallationDirectory/Scripts. Thanks for pointing out the issue with the documentation. I will update the documentation soon to reflex the changes in the code. pyqt5 branch is now merged with the main.

jewettaij commented 6 years ago

Great. I was able to install the updated SuRVoS without switching branches, and "SuRVoS" launches without needing to explicitly invoke "survos_launcher.py". Now all that's left is updating the documentation (at https://diamondlightsource.github.io/SuRVoS/docs/installation/). It looks like some changes might have been made already, but there's one remaining small issue. I noticed that the existing docs contain these lines:

$> conda create -n ccpi python=3.6
$> source activate ccpi

This no longer appears to be necessary (for me at least). Should we remove them from the documentation? We should probably also mention that the next two lines seem to be optional in ubuntu 18.04:

export PATH=<CUDA_HOME>/bin:$PATH
export LD_LIBRARY_PATH=<CUDA_HOME>/lib64:$LD_LIBRARY_PATH

They were not necessary in my case, because I installed CUDA using:

sudo apt-get install nvidia-cuda-toolkit

which (as of March 2018) installs CUDA9.1 "nvcc" in "/usr/bin", and the libraries in "/usr/lib/cuda" and "/usr/lib/nvidia-cuda-toolkit". (I have not actually tried actually computing anything with SuRVoS yet. But the launcher starts.) Once the docs are updated, or if I get a reply, I'll close the issue.

srikanthnagella commented 6 years ago

$> conda create -n ccpi python=3.6 $> source activate ccpi

The above two steps creates an environment in Anaconda similar to virtualenv and keeps the packages confined to virtual environment. This will avoid messing up the Anaconda installation.

export PATH=/bin:$PATH export LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH Above steps are optional in linux where the installation is using standard yum or apt-get but there are situations where users might have installed in a nonstandard path then the above steps are required.

jewettaij commented 6 years ago

Thanks for all your help