CellProfiler / python-bioformats

Read and write life sciences file formats
Other
131 stars 45 forks source link

Having a trouble to install it in ubuntu? #140

Closed Yuvi-416 closed 3 years ago

Yuvi-416 commented 3 years ago

(task-1) yuvi@yuvi-lfc:~$ pip install python-bioformats Collecting python-bioformats Using cached python_bioformats-4.0.0-py3-none-any.whl (35.3 MB) Collecting python-javabridge==4.0.0 Using cached python-javabridge-4.0.0.tar.gz (1.3 MB) Collecting boto3>=1.14.23 Using cached boto3-1.16.23-py2.py3-none-any.whl (129 kB) Requirement already satisfied: future>=0.18.2 in ./anaconda3/envs/task-1/lib/python3.7/site-packages (from python-bioformats) (0.18.2) Requirement already satisfied: numpy>=1.18.2 in ./anaconda3/envs/task-1/lib/python3.7/site-packages (from python-javabridge==4.0.0->python-bioformats) (1.19.4) Collecting s3transfer<0.4.0,>=0.3.0 Using cached s3transfer-0.3.3-py2.py3-none-any.whl (69 kB) Collecting botocore<1.20.0,>=1.19.23 Using cached botocore-1.19.23-py2.py3-none-any.whl (6.8 MB) Collecting jmespath<1.0.0,>=0.7.1 Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB) Collecting urllib3<1.27,>=1.25.4; python_version != "3.4" Using cached urllib3-1.26.2-py2.py3-none-any.whl (136 kB) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./anaconda3/envs/task-1/lib/python3.7/site-packages (from botocore<1.20.0,>=1.19.23->boto3>=1.14.23->python-bioformats) (2.8.1) Requirement already satisfied: six>=1.5 in ./anaconda3/envs/task-1/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.20.0,>=1.19.23->boto3>=1.14.23->python-bioformats) (1.15.0) Building wheels for collected packages: python-javabridge Building wheel for python-javabridge (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/yuvi/anaconda3/envs/task-1/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k8zbmqdc/python-javabridge/setup.py'"'"'; file='"'"'/tmp/pip-install-k8zbmqdc/python-javabridge/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-btd6f66y cwd: /tmp/pip-install-k8zbmqdc/python-javabridge/ Complete output (23 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/javabridge copying javabridge/wrappers.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/noseplugin.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/init.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/locate.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/jutil.py -> build/lib.linux-x86_64-3.7/javabridge creating build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_cpython.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/init.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_wrappers.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_javabridge.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_jutil.py -> build/lib.linux-x86_64-3.7/javabridge/tests creating build/lib.linux-x86_64-3.7/javabridge/jars copying javabridge/jars/rhino-1.7R4.jar -> build/lib.linux-x86_64-3.7/javabridge/jars running build_ext javac -source 8 -target 8 /tmp/pip-install-k8zbmqdc/python-javabridge/java/org/cellprofiler/runnablequeue/RunnableQueue.java unable to execute 'javac': No such file or directory error: command 'javac' failed with exit status 1

ERROR: Failed building wheel for python-javabridge Running setup.py clean for python-javabridge Failed to build python-javabridge Installing collected packages: python-javabridge, urllib3, jmespath, botocore, s3transfer, boto3, python-bioformats Running setup.py install for python-javabridge ... error ERROR: Command errored out with exit status 1: command: /home/yuvi/anaconda3/envs/task-1/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k8zbmqdc/python-javabridge/setup.py'"'"'; file='"'"'/tmp/pip-install-k8zbmqdc/python-javabridge/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-i6owgh66/install-record.txt --single-version-externally-managed --compile --install-headers /home/yuvi/anaconda3/envs/task-1/include/python3.7m/python-javabridge cwd: /tmp/pip-install-k8zbmqdc/python-javabridge/ Complete output (23 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/javabridge copying javabridge/wrappers.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/noseplugin.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/init.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/locate.py -> build/lib.linux-x86_64-3.7/javabridge copying javabridge/jutil.py -> build/lib.linux-x86_64-3.7/javabridge creating build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_cpython.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/init.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_wrappers.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_javabridge.py -> build/lib.linux-x86_64-3.7/javabridge/tests copying javabridge/tests/test_jutil.py -> build/lib.linux-x86_64-3.7/javabridge/tests creating build/lib.linux-x86_64-3.7/javabridge/jars copying javabridge/jars/rhino-1.7R4.jar -> build/lib.linux-x86_64-3.7/javabridge/jars running build_ext javac -source 8 -target 8 /tmp/pip-install-k8zbmqdc/python-javabridge/java/org/cellprofiler/runnablequeue/RunnableQueue.java unable to execute 'javac': No such file or directory error: command 'javac' failed with exit status 1

ERROR: Command errored out with exit status 1: /home/yuvi/anaconda3/envs/task-1/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k8zbmqdc/python-javabridge/setup.py'"'"'; file='"'"'/tmp/pip-install-k8zbmqdc/python-javabridge/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-i6owgh66/install-record.txt --single-version-externally-managed --compile --install-headers /home/yuvi/anaconda3/envs/task-1/include/python3.7m/python-javabridge Check the logs for full command output.

Yuvi-416 commented 3 years ago

I found the solution, it’s related to Java jdk.

u2056710 commented 3 years ago

Hi, I was just wondering what your solution was? I am having issues. I definetely have python-javabridge because I can run the following on python without any errors:

import javabridge javabridge.start_vm()

However when I do pip install python-bioformats it says that it Failed building wheel for python javabridge

It seems that downloading python-bioformats can't find the already installed javabridge?

Wondering if you could please help me, I'm new to all of this. Thank you!

Yuvi-416 commented 3 years ago

Hi, I thought it will work on any version of java or JDK but it didn't. So I try to install it after I install JDK 8 and uninstalling OpenJDK from ubuntu. After I install java 8 it started to work. especially this bellow one: /etc/alternatives/java: symbolic link to /usr/lib/jvm/jdk1.8.0_271/bin/java you can try to install above one. Hope it help you