I am trying to import PyPDF2 after successfully installing its latest version. And python 3.8.1 is also istalled on my enviornment. I get the following error:
File /anaconda/envs/us_indust/lib/python3.8/site-packages/Crypto/Cipher/ARC4.py:119
117 block_size = 1
118 #: Size of a key (in bytes)
--> 119 key_size = xrange(1,256+1)
NameError: name 'xrange' is not defined
I appreciate any help.
Thanks
I installed the latest version of PyPDF2 which is 3.0.0. The same error happens again.
You installed a heavily outdated version of pyPdf or PyPDF2. xrange isn't in the library for a long time
Or the error comes from an external dependeny, eg pycryptodome:

Crypto/Cipher/ARC4.py

Update that dependency
I received an error importing PyPDF2 library after I installed it