opendp / smartnoise-sdk

Tools and service for differentially private processing of tabular and relational data
MIT License
254 stars 68 forks source link

Support for Python 3.11 #600

Closed GiuliaGualtieri closed 1 month ago

GiuliaGualtieri commented 4 months ago

Description

If I create an environment with python version 3.11 and I try to install the smartnoise-synth package, I got an ERROR: no versions available for that package.

Command Line Example

conda create -n venv-ss-prova python=3.11 --yes
conda activate venv-ss-prova
pip install smartnoise-synth

then I got

ERROR: Ignored the following versions that require a different python version: 0.2.0 Requires-Python >=3.7.1,<=3.11; 0.2.1 Requires-Python >=3.7.1,<=3.11; 0.2.2 Requires-Python >=3.6.8,<3.9; 0.2.3 Requires-Python >=3.6.8,<3.9; 0.2.4 Requires-Python >=3.6.8,<3.9; 0.2.5 Requires-Python >=3.6.8,<3.9; 0.2.6 Requires-Python >=3.6.8,<3.9; 0.2.7 Requires-Python >=3.6.8,<3.9; 0.2.7.dev1 Requires-Python >=3.6.8,<3.9; 0.2.8 Requires-Python >=3.7,<3.9; 0.2.8.1 Requires-Python >=3.7,<3.9; 0.3.0 Requires-Python >=3.7,<3.11; 0.3.0.1 Requires-Python >=3.7,<3.11; 0.3.0.2 Requires-Python >=3.7,<3.11; 0.3.1 Requires-Python >=3.7,<3.11; 0.3.2 Requires-Python >=3.7,<3.11; 0.3.3 Requires-Python >=3.7,<3.11; 0.3.4 Requires-Python >=3.7,<3.11; 0.3.5 Requires-Python >=3.7,<3.11; 0.3.5.1 Requires-Python >=3.7,<3.11; 0.3.6 Requires-Python >=3.7,<3.11; 0.3.6.1 Requires-Python >=3.7,<3.11; 0.3.6.2 Requires-Python >=3.7,<=3.11; 0.3.7 Requires-Python >=3.7,<=3.11; 1.0.0 Requires-Python >=3.7,<=3.11; 1.0.1 Requires-Python >=3.7,<=3.11; 1.0.2 Requires-Python >=3.7,<=3.11; 1.0.3 Requires-Python >=3.7,<=3.11
ERROR: Could not find a version that satisfies the requirement smartnoise-synth (from versions: none)
PaulineMauryL commented 4 months ago

I have a similar issue. In setup.py, it states that the latest possible python version is 3.11. Would it be possible to support until 3.11.9 (or more)?

joshua-oss commented 3 months ago

The issue here is that we have a dependency on Torch <2.0.0, and these older versions do not support newer Python. We need torch only for the DP-GAN and PATE-GAN, and were planning to deprecate the DP-GAN variants anyway. Will investigate porting PATE-GAN and PATE-CTGAN to torch >=2.0.0.

joshua-oss commented 3 months ago

OK, version 1.0.4 is published to PyPi and should support Python 3.11. Please report back if you encounter any issues

PaulineMauryL commented 3 months ago

That's great! Thank you

PaulineMauryL commented 3 months ago

It works with python 3.11.9 but just FYI in one of my environment I had to do pip install packaging first for Synthesizer.create("dpctgan", ...) to run properly.

GiuliaGualtieri commented 1 month ago

Hello, thanks, now I can work on python 3.11. I close the issue then.