crc32 not found
valiantljk opened this issue · 4 comments
valiantljk commented
Describe the bug
crc32c module not found
Minimal runnable code to reproduce the behavior
from tensorboardX import SummaryWriter
Error:
Traceback (most recent call last):
File "/Users/dr6jl/.local/lib/python3.8/site-packages/crc32c/__init__.py", line 25, in <module>
from crc32c import cffi as _crc32c
File "/Users/dr6jl/.local/lib/python3.8/site-packages/crc32c/cffi.py", line 20, in <module>
import crc32c._crc32c_cffi
ModuleNotFoundError: No module named 'crc32c._crc32c_cffi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dr6jl/anaconda3/lib/python3.8/site-packages/tensorboardX/__init__.py", line 4, in <module>
from .record_writer import RecordWriter
File "/Users/dr6jl/anaconda3/lib/python3.8/site-packages/tensorboardX/record_writer.py", line 23, in <module>
from .crc32c import crc32c
File "/Users/dr6jl/anaconda3/lib/python3.8/site-packages/tensorboardX/crc32c.py", line 8, in <module>
from crc32c import crc32 as _crc32c_native
File "/Users/dr6jl/.local/lib/python3.8/site-packages/crc32c/__init__.py", line 29, in <module>
warnings.warn(RuntimeWarning, "_SLOW_CRC32C_WARNING",)
TypeError: category must be a Warning subclass, not 'str'
Expected behavior
import should work
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
What is the result of
pip list|grep -E "torch|proto|tensor"
pip list|grep -E "torch|proto|tensor"
googleapis-common-protos 1.52.0
protobuf 3.15.7
tensorboard 2.2.2
tensorboard-plugin-wit 1.7.0
tensorboardX 2.1
tensorflow-estimator 2.4.0
torch 1.5.1
torchvision 0.6.1
Python environment
Which version of python are you using?
Python 3.8.3
lanpa commented
Hi, I might need more information about the crc32c package you used. I can't reproduce with crc32c==2.2
valiantljk commented
Hi @lanpa
pip list | grep 'crc32c'
crc32c 2.2
google-crc32c 0.1.0
lanpa commented
I can reproduce with google-crc32c==0.1.0. After update to google-crc32c==1.1.2, the error is gone.
valiantljk commented
Thanks @lanpa, with google-crc32c==1.1.2, it works now.