OpenMined / PyDP

The Python Differential Privacy Library. Built on top of: https://github.com/google/differential-privacy
Apache License 2.0
500 stars 138 forks source link

1.0.2 Wheel wont install on MacOS 10.15 #358

Closed madhavajay closed 2 years ago

madhavajay commented 3 years ago

Description

I just noticed that the MacOS Wheels for 1.0.2 won't install on my MacOS 10.15.

This means the build process isn't quite right because wheels should be backwards compatible with MacOS 11 and 10.15 and even older.

Renaming the file to: python_dp-1.0.2-cp38-cp38-macosx_10_15_x86_64.whl works which is a known solution for these incorrectly built wheels.

I believe @bcebere fixed this on TenSEAL back in December.

Are you interested in working on this improvement yourself?

Possibly

Additional Context

None needed.

bcebere commented 3 years ago

I think the issue is for Bazel environments only.

Here is the fix for the PSI project, if I remember correctly https://github.com/OpenMined/PSI/blob/master/.github/workflows/scripts/release_osx.sh

You need to set the MACOSX_DEPLOYMENT_TARGET env and build the wheel using

python3 setup.py build bdist_wheel --plat-name macosx_10_14_x86_64 --dist-dir wheel
victorperezc commented 3 years ago

Hi @bcebere! I was facing the same installation issue as @madhavajay on macOS Big Sur Version 11.2.3. Fixed it by following your instructions above. Nevertheless, when I import pydp now I got the following error

<ipython-input-14-401ae74f6323> in <module>
      9 logging.basicConfig(level=logging.ERROR)
     10 
---> 11 import pydp
     12 sy.load('pydp')

/usr/local/lib/python3.9/site-packages/pydp/__init__.py in <module>
----> 1 from pydp import algorithms, distributions, util
      2 
      3 
      4 __version__ = "1.0.2"
      5 

/usr/local/lib/python3.9/site-packages/pydp/algorithms/__init__.py in <module>
----> 1 from . import laplacian
      2 
      3 __all__ = ["laplacian"]

/usr/local/lib/python3.9/site-packages/pydp/algorithms/laplacian/__init__.py in <module>
----> 1 from ._bounded_algorithms import (
      2     BoundedMean,
      3     BoundedSum,
      4     BoundedStandardDeviation,
      5     BoundedVariance,

/usr/local/lib/python3.9/site-packages/pydp/algorithms/laplacian/_bounded_algorithms.py in <module>
----> 1 from .._algorithm import BoundedAlgorithm
      2 
      3 
      4 class BoundedMean(BoundedAlgorithm):
      5     """

/usr/local/lib/python3.9/site-packages/pydp/algorithms/_algorithm.py in <module>
      1 import math
      2 
----> 3 from .._pydp import _algorithms  # type: ignore
      4 
      5 from typing import Union, List

ModuleNotFoundError: No module named 'pydp._pydp'
madhavajay commented 2 years ago

Solved by newer releases.