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

ModuleNotFoundError: No module named 'Pyfhel.Pyfhel.Pyfhel' #245

Open
lilvmy opened this issue Jul 8, 2024 · 6 comments
Open

ModuleNotFoundError: No module named 'Pyfhel.Pyfhel.Pyfhel' #245

lilvmy opened this issue Jul 8, 2024 · 6 comments
Labels

Comments

@lilvmy
Copy link

lilvmy commented Jul 8, 2024

Description
I have installed Pyfhel==3.4.2, but import the Pyfhel leads an error ModuleNotFoundError: No module named 'Pyfhel.Pyfhel.Pyfhel'
Code To Reproduce Error
from Pyfhel import Pyfhel

Expected behavior
Traceback (most recent call last):
File "/home/cysren/home/cysren/Desktop/ld_file/Secure-DNN-Inference-with-Adversarial-training/SimpleExample/SimEncryptProcessing.py", line 10, in
from Pyfhel import Pyfhel
File "/home/cysren/.virtualenvs/ld_env/lib/python3.8/site-packages/Pyfhel/init.py", line 1, in
from .Pyfhel import Pyfhel
File "/home/cysren/.virtualenvs/ld_env/lib/python3.8/site-packages/Pyfhel/Pyfhel/init.py", line 1, in
from .Pyfhel import Pyfhel
ModuleNotFoundError: No module named 'Pyfhel.Pyfhel.Pyfhel'

Setup:

  • OS: [e.g. Ubuntu]
  • Python: [e.g. 3.8.19]
  • C compiler version: [e.g. gcc 11.4.0 64 bit (nvida), can be easily found between brackets by running python in a terminal]
  • Pyfhel Version: [e.g. 3.4.2 --> If lower than latest github repo version, please try that one out first!]
@lilvmy lilvmy added the bug label Jul 8, 2024
@ibarrond
Copy link
Owner

ibarrond commented Jul 8, 2024 via email

@lilvmy
Copy link
Author

lilvmy commented Jul 9, 2024

cd .virtualenvs/ld_env/lib/python3.8/site-packages
git clone --recursive https://github.com/ibarrond/Pyfhel.git
cd Pyfhel
1
vim pyproject.toml
SEAL_THROW_ON_TRANSPARENT_CIPHERTEXT="OFF"
esc :wq

pip install . -v

2

from Pyfhel import Pyfhel

Traceback (most recent call last):
File "/home/cysren/home/cysren/Desktop/ld_file/Secure-DNN-Inference-with-Adversarial-training/SimpleExample/test.py", line 3, in
from Pyfhel import Pyfhel
File "/home/cysren/.virtualenvs/ld_env/lib/python3.8/site-packages/Pyfhel/init.py", line 1, in
from .Pyfhel import Pyfhel
File "/home/cysren/.virtualenvs/ld_env/lib/python3.8/site-packages/Pyfhel/Pyfhel/init.py", line 1, in
from .Pyfhel import Pyfhel
ModuleNotFoundError: No module named 'Pyfhel.Pyfhel.Pyfhel'

@ibarrond
Copy link
Owner

ibarrond commented Jul 9, 2024

@lilvmy You still haven´t filled the details above. What OS? What Python Version? What C compiler version?

@lilvmy
Copy link
Author

lilvmy commented Jul 9, 2024

Thank you, I will list these information.

system: Linux version 6.5.0-41-generic (buildd@lcy02-amd64-120) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu122.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #4122.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2

Python version: 3.8.19
C compiler version: g++ is already the newest version (4:11.2.0-1ubuntu1).
gcc is already the newest version (4:11.2.0-1ubuntu1).

When I use pip install Pyfhel, it does not apper above-mentioned issues

@ibarrond
Copy link
Owner

ibarrond commented Jul 9, 2024 via email

@lilvmy
Copy link
Author

lilvmy commented Jul 9, 2024

Noted with thanks, the gcc version is 11.4.0

(ld_env) (base) cysren@cysren-Precision-3660:$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1
22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

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

No branches or pull requests

2 participants