Smile-SA / anonymization

Text anonymization in many languages using Faker
MIT License
27 stars 6 forks source link

ModuleNotFoundError: No module named 'anonymization.lib' #1

Closed lucazav closed 3 years ago

lucazav commented 3 years ago

I installed the package in a Python 3.9.1 conda environment. When running just the script import anonymization, I'm getting the following error:


ModuleNotFoundError Traceback (most recent call last) d:\LZavarella\OneDrive\anonymize.py in ----> 7 import anonymization

~\miniconda3\envs\pbi_powerquery_env\lib\site-packages\anonymization__init__.py in ----> 1 from .anonymizers import 2 from .Anonymization import

~\miniconda3\envs\pbi_powerquery_env\lib\site-packages\anonymization\anonymizers__init__.py in ----> 1 from .fileAnonymizers import 2 from .internetAnonymizers import 3 from .spacyAnonymizers import 4 from .phoneNumberAnonymizers import 5 from .dictionaryAnonymizers import *

~\miniconda3\envs\pbi_powerquery_env\lib\site-packages\anonymization\anonymizers\fileAnonymizers.py in ----> 1 from ..Anonymization import Anonymization 2 3 class FilePathAnonymizer(): 4 ''' 5 Replace file paths such as 'some/file/path.ext' with a fake file path

~\miniconda3\envs\pbi_powerquery_env\lib\site-packages\anonymization\Anonymization.py in 5 from faker import Factory 6 ----> 7 from .lib.diff_match_patch import diff_match_patch 8 9 class Anonymization:

ModuleNotFoundError: No module named 'anonymization.lib'

Any hint to fix the issue, please?

lucazav commented 3 years ago

I solved manually copying the "lib" folder into "site-packages\anonymization".

Veeraraghavans commented 3 years ago

Have you try installing anonymization pip before importing them??

lucazav commented 3 years ago

Sure, it was the first step I did.

Veeraraghavans commented 3 years ago

Thanks @lucazav for reporting this issue. We tried reproducing the same we didnt get the error during import. It might be the issue with environmental variable at your end.

Do you let me know if you looking for some more information.

lucazav commented 3 years ago

Thanks @Veeraraghavans. The only thing I can add is that I'm using a Windows 10 OS. Anyway, no problem.

dominikbura-sw commented 3 years ago

Hi, I have the same issue, both in Azure and local.

Veeraraghavans commented 3 years ago

Hi, I have the same issue, both in Azure and local.

Can you check now @dominikhait ?