Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install the library? #79

Open
AnandN5 opened this issue Aug 11, 2023 · 6 comments
Open

How to install the library? #79

AnandN5 opened this issue Aug 11, 2023 · 6 comments

Comments

@AnandN5
Copy link

AnandN5 commented Aug 11, 2023

How can I install the library to a Linux or OSX system?

@bencrts
Copy link
Collaborator

bencrts commented Aug 22, 2023

Hi @AnandN5!

I would reccomend installing SageMath following the instructions from here: https://doc.sagemath.org/html/en/installation/index.html. Once you have Sage on your system you can open a Sage notebook and import the estimator, e.g.:

% sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.3, Release Date: 2021-05-09                     │
│ Using Python 3.8.10. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: from estimator import *
sage: params = schemes.CHHS_1024_25
sage: params
LWEParameters(n=1024, q=33554432, Xs=D(σ=0.25), Xe=D(σ=3.19), m=+Infinity, tag='CHHS_1024_25')

Alternatively, you can write sage/python files and run them from the command line via e.g. sage file.py.

@nindanaoto
Copy link

I'm using this library through importlib of Python's standard library like this.
https://github.com/virtualsecureplatform/Parameter-Selection/blob/master/python/newTFHE.py

@TrishaDatta
Copy link

Hi, I'm trying to run this package locally, but I keep running into errors.

I started by running:

pip3 install estimator

Then when I tried to run from estimator import * in my Python file, I got an error that tensorflow was not installed, so I ran

pip3 install tensorflow

But then when I try to run from estimator import *, I get the following error:

AttributeError: module 'tensorflow' has no attribute 'clip_by_average_norm'

From some Googling, it seems like this is a version error, and I need tensorflow and tensorflow-estimator version 2.1.0, but I don't think these versions are compatible with Python 3.9. I'm currently trying to set up a conda environment with Python 3.7 (though this is not natively compatible with my M1 Mac), and I'm wondering if there's a simpler way to do all of this? Thank you!

@joerowell
Copy link
Contributor

joerowell commented Jan 4, 2024 via email

@TrishaDatta
Copy link

ahhh thank you so much!!! very silly mistake on my part

@parkszachta
Copy link

I'm reviving this thread! Alas, when I run from estimator import * within Sage, I still get an error saying ModuleNotFoundError: No module named 'tensorflow'. This happens outside of Sage when I use Kaggle, too.

How do I resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants