Closed velovix closed 1 year ago
Thanks for reporting. To be clear: It does work for you in the end, if you use a non-default version of pip?
Yes, that's right! No issues after a downgrade.
pip3 install --upgrade pip==21.2.4
We will look into this soon once we start officially supporting Ubuntu 22.04. For now I hope you can life with the pip-version workaround.
I was recently able to just do pip install zivid
on a fresh Ubuntu 22.04 with the latest pip, so this problem may have been resolved. Could you perhaps check on your system, @velovix ?
@eskaur After doing some testing on my host machine (which is also Ubuntu 22.04), I noticed that the build dependencies resolve fine only when I use a virtual environment. We don't use virtual environments since we deploy in Docker, so maybe that's why we're seeing different things.
Here's a minimal Dockerfile I made to demonstrate the problem:
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y python3-pip python3-dev g++ cmake curl ca-certificates
RUN pip3 install --upgrade pip==22.2.2
WORKDIR /zivid
RUN update-ca-certificates && \
curl -sSL https://www.zivid.com/hubfs/softwarefiles/releases/2.7.0+e31dcbe2-1/u20/zivid-telicam-driver_3.0.1.1-3_amd64.deb --output zivid-telicam-driver.deb && \
curl -sSL https://www.zivid.com/hubfs/softwarefiles/releases/2.7.0+e31dcbe2-1/u20/zivid_2.7.0+e31dcbe2-1_amd64.deb --output zivid.deb && \
curl -sSL https://www.zivid.com/hubfs/softwarefiles/releases/2.7.0+e31dcbe2-1/u20/zivid-tools_2.7.0+e31dcbe2-1_amd64.deb --output zivid-tools.deb
RUN apt install -y ./zivid.deb ./zivid-tools.deb ./zivid-telicam-driver.deb
RUN pip3 install zivid
Thanks for the minimum reproducing example. :+1: We will look into it.
Hi @eskaur I was wondering if there's been any progress on this? We're still successfully able to use the latest version of the SDK if we use pip 21.2.4
, but eventually using older pip versions might become a blocker for installing newer libraries.
Hi @apockill !
The latest version of ZIvid SDK (2.8) was the first one to officially support Ubuntu 22.04. Unfortunately the python package is lagging a bit behind, but it is on our short-term roadmap to also officially support Ubuntu 22.04 with the python package. As part of that process I am confident that this issue will be resolved.
In the meantime I think using virtual environment is a decent workaround. Using venv is good practice anyway :)
@apockill
An alternative workaround that doesn't require downgrading pip
is to add the following to your Dockerfile
.
RUN apt-get install cmake ninja-build --assume-yes
RUN pip install conan
Update: We recently added Ubuntu 22.04 to the zivid-python CI: https://github.com/zivid/zivid-python/pull/206 . The build and tests happen in a Ubuntu 22.04 Docker container with no virtual environment, and it works fine. I suspect something got improved in pip so that it now works.
FYI @apockill and @velovix
Thanks for the heads up @eskaur. I can confirm that it works with pip==23.0.1
and zivid==2.7.1.2.8.1
!
When attempting to install Zivid via Pip on Ubuntu 22.04, the build does not find Ninja even though build dependencies appear to have been installed.
It seems the issue only happens when using Pip >= 21.3 and Python 3.10 at the same time. Using later versions of Pip with Python 3.8 or Python 3.10 with earlier versions of Pip works fine. This leads me to believe that the issue is related to this change in Pip v21.3:
Pulled from their changelist here