numbersprotocol / pyc2pa

Python implementation of C2PA: Coalition for Content Provenance and Authenticity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to install c2pa on a MacOS

benhylau opened this issue · comments

I am trying to install this on a M1 Mac with Big Sur, but hitting this error:

❯❯❯ python3.9 -m pip install c2pa
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting c2pa
  Using cached c2pa-1.4.1-py3-none-any.whl (41 kB)
Collecting endesive>=2.0.2
  Using cached endesive-2.0.6-py3-none-any.whl (340 kB)
Collecting pycryptodome>=3.9.9
  Using cached pycryptodome-3.11.0.tar.gz (3.8 MB)
  Preparing metadata (setup.py) ... done
Collecting py-multibase>=1.0.3
  Using cached py_multibase-1.0.3-py2.py3-none-any.whl (6.4 kB)
Collecting pymultihash>=0.8.2
  Using cached pymultihash-0.8.2-py3-none-any.whl (13 kB)
Collecting py3exiv2>=0.9.3
  Using cached py3exiv2-0.9.3.tar.gz (36 kB)
  Preparing metadata (setup.py) ... done
ERROR: No .egg-info directory found in /private/var/folders/74/r2wbwfq921d_5vb635l1nmym0000gn/T/pip-pip-egg-info-_r5vkis_

I initially suspected this is a problem with my local environment, but I have updated everything, and this seems to be the only package giving me this problem. Here's a successful installation of another python package:

❯❯❯ python3.9 -m pip install pillow
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting pillow
  Downloading Pillow-8.4.0-cp39-cp39-macosx_11_0_arm64.whl (2.8 MB)
     |████████████████████████████████| 2.8 MB 11.0 MB/s
Installing collected packages: pillow
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed pillow-8.4.0

I understand the instructions are for Linux, but this part should be same across platforms. Has anyone tried this on a Mac, or this latest package on Linux?

This part shouldn't matter, but I also have done a brew install swig. Where is swig needed anyways?

Thanks for the help!

Hello Ben,

I'm using intel Mac with Big Sur 11.5.2, and I have encountered the same problem before.
Don't remember all the detail, but I think it's a problem with py3exiv2 installation.

Here's the link that helped me resolve the problem. Hope that it can help!

Thanks @vincent10400094 this is helpful, at least I know what direction to look now. I followed the linked instructions:

  1. Download the py3exiv2 package from here
  2. Run brew install boost-python3 gexiv2 pygobject3
  3. pip3.9 install py3exiv2-0.9.3.tar.gz <- this fails

I am still getting the error even if I use the local file:

❯❯❯ pip3.9 install py3exiv2-0.9.3.tar.gz
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Processing ./py3exiv2-0.9.3.tar.gz
  Preparing metadata (setup.py) ... done
ERROR: No .egg-info directory found in /private/var/folders/74/r2wbwfq921d_5vb635l1nmym0000gn/T/pip-pip-egg-info-ah0t8tpt

I tried several earlier releases but same problem. Do you remember if you had to do anything else?

I also notices this dependency doesn't officially support MacOS, so perhaps I am better off using a Linux machine.