failed to install
SaeedShurrab opened this issue · comments
- eyepy version:latest
- Python version:3.8.16
- Operating System:Linux in docker container
Description
I try to install your library but I get:
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> imagecodecs
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
What I Did
pip install -U eyepie
I have never seen that problem, but have you tried upgrading pip before running pip install?
Have you tried what's suggested in the blog post here?
The problem might be that your docker container misses some dependencies required by imagecodecs
Yes i did update pip, still the same problem.
I also updated wheels as setup tools, still the same problem.
do you mean linux packages or python packages fo dependencies?
The python dependencies are all specified in the package, but imagecodecs might have to be built for your system so maybe the dependencies for building this package are missing. What base image are you using for your docker container, so I could try to replicate the issue.
this is the content of dockerfile
FROM python:3.8
RUN pip install -U pip
RUN mkdir /src
WORKDIR /src
RUN pip install --no-cache-dir pandas \
numpy \
jupyter \
matplotlib \
oct-converter
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
EXPOSE 8888
ENTRYPOINT jupyter notebook --ip 0.0.0.0 --no-browser --allow-root
I used your Dockerfile, only adding eyepie to the pip install command. Then I build the container without any problems and could import eyepy and imagecodecs in a Jupyter notebook. So I can not reproduce your issue are you sure it persists when adding eyepie to the Dockerfile and then building the container?
I installed the package inside the container, I will try rebuilding the image again as you did and update you.
still, I have a problem. I do not know what is the reason. I tried installing the package on Colab and it was installed properly.
sorry this comment was meant for eyepy not oct-converter, I missed the repo
sorry this comment was meant for eyepy not oct-converter, I missed the repo
no you didn't, i got confused abotu the repo! have deleted my message
still, I have a problem. I do not know what is the reason. I tried installing the package on Colab and it was installed properly.
Do you get the same Error message when building the container?
Hi Oli,
This is my updated docker file
FROM python:3.8
RUN pip install -U pip setuptools wheel
RUN mkdir /src
WORKDIR /src
RUN pip install --no-cache-dir -U eyepie
EXPOSE 8888
ENTRYPOINT jupyter notebook --ip 0.0.0.0 --no-browser --allow-root
and this is the error I get
[+] Building 15.7s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 589B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/python:3.8 0.9s
=> CACHED [1/5] FROM docker.io/library/python:3.8@sha256:09fb8210b6822d357da41ccd7f8f2a164c6fe8f268b230575456d12c31a216fb 0.0s
=> [2/5] RUN pip install -U pip setuptools wheel 2.9s
=> [3/5] RUN mkdir /src 0.1s
=> [4/5] WORKDIR /src 0.0s
=> ERROR [5/5] RUN pip install --no-cache-dir -U eyepie 11.6s
------
> [5/5] RUN pip install --no-cache-dir -U eyepie:
#8 0.376 Collecting eyepie
#8 0.431 Downloading eyepie-0.8.0-py3-none-any.whl (42 kB)
#8 0.441 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 kB 4.1 MB/s eta 0:00:00
#8 0.503 Collecting scikit-image<0.20.0,>=0.19.1
#8 0.513 Downloading scikit_image-0.19.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.5 MB)
#8 4.879 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.5/13.5 MB 2.5 MB/s eta 0:00:00
#8 4.997 Collecting matplotlib<4.0.0,>=3.5.1
#8 5.009 Downloading matplotlib-3.7.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (11.4 MB)
#8 5.770 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.4/11.4 MB 15.0 MB/s eta 0:00:00
#8 5.923 Collecting numpy<2.0.0,>=1.24.2
#8 5.936 Downloading numpy-1.24.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.0 MB)
#8 6.899 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 14.6 MB/s eta 0:00:00
#8 6.928 Collecting nptyping<3.0.0,>=2.3.1
#8 6.940 Downloading nptyping-2.5.0-py3-none-any.whl (37 kB)
#8 7.038 Collecting pandas<2.0.0,>=1.5.3
#8 7.057 Downloading pandas-1.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (11.5 MB)
#8 7.851 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.5/11.5 MB 14.7 MB/s eta 0:00:00
#8 7.881 Collecting construct-typing<0.6.0,>=0.5.5
#8 7.894 Downloading construct_typing-0.5.5-py3-none-any.whl (23 kB)
#8 8.197 Collecting imagecodecs<2022.0.0,>=2021.11.20
#8 8.210 Downloading imagecodecs-2021.11.20.tar.gz (11.2 MB)
#8 10.88 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.2/11.2 MB 3.9 MB/s eta 0:00:00
#8 11.33 Preparing metadata (setup.py): started
#8 11.44 Preparing metadata (setup.py): finished with status 'error'
#8 11.44 error: subprocess-exited-with-error
#8 11.44
#8 11.44 × python setup.py egg_info did not run successfully.
#8 11.44 │ exit code: 1
#8 11.44 ╰─> [46 lines of output]
#8 11.44 running egg_info
#8 11.44 creating /tmp/pip-pip-egg-info-6ortyrtj/imagecodecs.egg-info
#8 11.44 writing /tmp/pip-pip-egg-info-6ortyrtj/imagecodecs.egg-info/PKG-INFO
#8 11.44 writing dependency_links to /tmp/pip-pip-egg-info-6ortyrtj/imagecodecs.egg-info/dependency_links.txt
#8 11.44 writing entry points to /tmp/pip-pip-egg-info-6ortyrtj/imagecodecs.egg-info/entry_points.txt
#8 11.44 writing requirements to /tmp/pip-pip-egg-info-6ortyrtj/imagecodecs.egg-info/requires.txt
#8 11.44 writing top-level names to /tmp/pip-pip-egg-info-6ortyrtj/imagecodecs.egg-info/top_level.txt
#8 11.44 writing manifest file '/tmp/pip-pip-egg-info-6ortyrtj/imagecodecs.egg-info/SOURCES.txt'
#8 11.44 Traceback (most recent call last):
#8 11.44 File "<string>", line 2, in <module>
#8 11.44 File "<pip-setuptools-caller>", line 34, in <module>
#8 11.44 File "/tmp/pip-install-sa3ft7pj/imagecodecs_2606be3076994da5ac85bae79b8334b1/setup.py", line 631, in <module>
#8 11.44 setup(
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 108, in setup
#8 11.44 return distutils.core.setup(**attrs)
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
#8 11.44 return run_commands(dist)
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
#8 11.44 dist.run_commands()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
#8 11.44 self.run_command(cmd)
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 1221, in run_command
#8 11.44 super().run_command(command)
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
#8 11.44 cmd_obj.run()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 318, in run
#8 11.44 self.find_sources()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 326, in find_sources
#8 11.44 mm.run()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 570, in run
#8 11.44 self.add_defaults()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 608, in add_defaults
#8 11.44 sdist.add_defaults(self)
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/command/sdist.py", line 106, in add_defaults
#8 11.44 super().add_defaults()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
#8 11.44 self._add_defaults_ext()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
#8 11.44 build_ext = self.get_finalized_command('build_ext')
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
#8 11.44 cmd_obj.ensure_finalized()
#8 11.44 File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
#8 11.44 self.finalize_options()
#8 11.44 File "/tmp/pip-install-sa3ft7pj/imagecodecs_2606be3076994da5ac85bae79b8334b1/setup.py", line 600, in finalize_options
#8 11.44 import numpy
#8 11.44 ModuleNotFoundError: No module named 'numpy'
#8 11.44 [end of output]
#8 11.44
#8 11.44 note: This error originates from a subprocess, and is likely not a problem with pip.
#8 11.44 error: metadata-generation-failed
#8 11.44
#8 11.44 × Encountered error while generating package metadata.
#8 11.44 ╰─> See above for output.
#8 11.44
#8 11.44 note: This is an issue with the package mentioned above, not pip.
#8 11.44 hint: See above for details.
------
executor failed running [/bin/sh -c pip install --no-cache-dir -U eyepie]: exit code: 1
I used your Dockerfile, only adding eyepie to the pip install command. Then I build the container without any problems and could import eyepy and imagecodecs in a Jupyter notebook. So I can not reproduce your issue are you sure it persists when adding eyepie to the Dockerfile and then building the container?
Could you please tell me your docker daemon is running on which OS? is it Linux or macOS
My docker daemon is running on top of M1 macOS, which I think isn't why the image builds correctly.
My docker daemon is running on Ubuntu Linux. There seems to be a known issue with imagecodecs on M1 macOS. I am going to upgrade the imagecodecs package to the latest version in the next release. That might help especially when there were also problems with running directly on macOS.
The docker issue seems to be different. I can build the container from your Dockerfile with only eyepie but for you it seems to complain about a missing numpy. Maybe add numpy as an install before eyepie to your Dockerfile but I don't know why this should be necessary.
Since you are mainly interested in the E2E Reader another option for you might be to install eyepie without imagecodecs which is only required to read tiff files from the XML export not for reading E2E.
My docker daemon is running on Ubuntu Linux. There seems to be a known issue with imagecodecs on M1 macOS. I am going to upgrade the imagecodecs package to the latest version in the next release. That might help especially when there were also problems with running directly on macOS.
The docker issue seems to be different. I can build the container from your Dockerfile with only eyepie but for you it seems to complain about a missing numpy. Maybe add numpy as an install before eyepie to your Dockerfile but I don't know why this should be necessary.
Since you are mainly interested in the E2E Reader another option for you might be to install eyepie without imagecodecs which is only required to read tiff files from the XML export not for reading E2E.
Hi Oli,
It is fine with the installation, I do install the package on the campus HPC and it worked well for me.
I tried to read the E2E files but I get out of index error, I also tried to load the drusen patient example but it returned a response not the oct.
Should I put new issues here or in a new issue??
Would be great if you can open a new issue.