CellProfiler / python-bioformats

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

Install on windows 10 fails #123

Open jaydoc opened 5 years ago

jaydoc commented 5 years ago

Hi all

ERROR: Command errored out with exit status 1: command: 'c:\users\jaydoc\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jaydoc\\AppData\\Local\\Temp\\pip-install-4u90_x9f\\javabridge\\setup.py'"'"'; __file__='"'"'C:\\Users\\jaydoc\\AppData\\Local\\Temp\\pip-install-4u90_x9f\\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 'C:\Users\jaydoc\AppData\Local\Temp\pip-wheel-yj5dxckn' --python-tag cp37 cwd: C:\Users\jaydoc\AppData\Local\Temp\pip-install-4u90_x9f\javabridge\ Complete output (29 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\javabridge copying javabridge\jutil.py -> build\lib.win-amd64-3.7\javabridge copying javabridge\locate.py -> build\lib.win-amd64-3.7\javabridge copying javabridge\noseplugin.py -> build\lib.win-amd64-3.7\javabridge copying javabridge\wrappers.py -> build\lib.win-amd64-3.7\javabridge copying javabridge\_version.py -> build\lib.win-amd64-3.7\javabridge copying javabridge\__init__.py -> build\lib.win-amd64-3.7\javabridge creating build\lib.win-amd64-3.7\javabridge\tests copying javabridge\tests\test_cpython.py -> build\lib.win-amd64-3.7\javabridge\tests copying javabridge\tests\test_javabridge.py -> build\lib.win-amd64-3.7\javabridge\tests copying javabridge\tests\test_jutil.py -> build\lib.win-amd64-3.7\javabridge\tests copying javabridge\tests\test_wrappers.py -> build\lib.win-amd64-3.7\javabridge\tests copying javabridge\tests\__init__.py -> build\lib.win-amd64-3.7\javabridge\tests creating build\lib.win-amd64-3.7\javabridge\jars copying javabridge\jars\cpython.jar -> build\lib.win-amd64-3.7\javabridge\jars copying javabridge\jars\rhino-1.7R4.jar -> build\lib.win-amd64-3.7\javabridge\jars copying javabridge\jars\runnablequeue.jar -> build\lib.win-amd64-3.7\javabridge\jars copying javabridge\jars\test.jar -> build\lib.win-amd64-3.7\javabridge\jars running build_ext C:\Program Files\Java\jdk-12.0.2\bin\javac.exe -source 6 -target 6 C:\Users\jaydoc\AppData\Local\Temp\pip-install-4u90_x9f\javabridge\java\org\cellprofiler\runnablequeue\RunnableQueue.java warning: [options] bootstrap class path not set in conjunction with -source 6 error: Source option 6 is no longer supported. Use 7 or later. error: Target option 6 is no longer supported. Use 7 or later. error: command 'C:\\Program Files\\Java\\jdk-12.0.2\\bin\\javac.exe' failed with exit status 2 ----------------------------------------

This is the error I get when I try to do 'pip install python-bioformats'

I tried installing javabridge explicitly and then tried installing python-bioformats but the same error repeats itself.

Can anyone help? I want to install bioformats so I can create a montage of images to use in cellprofiler for an imaging flow cytometry pipeline,

Thanks

bethac07 commented 5 years ago

Hi,

Have you confirmed Javabridge is actually working on your system, ie if you start python and

import javabridge 
javabridge.start_vm()

does javabridge throw an error? Have you set JAVA_HOME on your machine?

jaydoc commented 5 years ago

javabridge seems to be installed and available as the two commands you mentioned don't throw any errors.

JAVA_HOME is set to C:\Program Files\Java\jdk-12.0.2\bin in user variables and also shows up in the system path.

bethac07 commented 5 years ago

Great, thanks, just worth checking all that first. Can you also post your pip freeze (either your whole one, or just the line for your javabridge), as well as the full install terminal output for when you try to install? I posted mine as an example below, for Mac with Python 3.7.

My biggest guess for why it might try to reinstall javabridge is that python-bioformats isn't correctly detecting the javabridge version installed.

If there is a bug in either javabridge or p-b and you don't have time right now for us to fix it, if you don't absolutely need to be running Java12 and don't mind kicking back to 11, the absolute fastest thing to do would probably be to uninstall Java12, install Java (or OpenJDK) 11, set your JAVA_HOME there, then use the Gohlke wheel of javabridge instead of building javabridge yourself, then retry installing p-b. I'd still appreciate you posting us that info though, so that if it is a bug we can help others!

pip install python-bioformats
Collecting python-bioformats
Requirement already satisfied: future in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from python-bioformats) (0.17.1)
Requirement already satisfied: javabridge>=1.0 in /Users/bcimini/Documents/GitHub/leek/python-javabridge (from python-bioformats) (1.0.18.post16+gc7ccaed)
Requirement already satisfied: boto3 in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from python-bioformats) (1.9.220)
Requirement already satisfied: numpy in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from javabridge>=1.0->python-bioformats) (1.17.1)
Requirement already satisfied: botocore<1.13.0,>=1.12.220 in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from boto3->python-bioformats) (1.12.220)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from boto3->python-bioformats) (0.9.4)
Requirement already satisfied: s3transfer<0.3.0,>=0.2.0 in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from boto3->python-bioformats) (0.2.1)
Requirement already satisfied: docutils<0.16,>=0.10 in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from botocore<1.13.0,>=1.12.220->boto3->python-bioformats) (0.15.2)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1; python_version >= "2.7" in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from botocore<1.13.0,>=1.12.220->boto3->python-bioformats) (2.8.0)
Requirement already satisfied: urllib3<1.26,>=1.20; python_version >= "3.4" in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from botocore<1.13.0,>=1.12.220->boto3->python-bioformats) (1.25.3)
Requirement already satisfied: six>=1.5 in /Users/bcimini/.virtualenvs/CP4/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1; python_version >= "2.7"->botocore<1.13.0,>=1.12.220->boto3->python-bioformats) (1.12.0)
Installing collected packages: python-bioformats
Successfully installed python-bioformats-1.5.2
jaydoc commented 5 years ago

Hi there.

I did what you suggested. Installed JDK 11 and updated system paths to reflect this. And it installed javabridge correctly.

Thanks.