facebookarchive / adversarial_image_defenses

Countering Adversarial Image using Input Transformations.
Other
487 stars 75 forks source link

Cannot open shared object file: No such file or directory #12

Closed gaosh closed 6 years ago

gaosh commented 6 years ago

I installed Faiss and other packages followed instruction, but I got these errors when I try to run the demo. My environment is pytorch 0.4 and python 3.6.

Traceback (most recent call last): File "adversarial/examples/demo.py", line 17, in from adversarial.gen_transformed_images import generate_transformed_images File "/home/shangqian/anaconda3/lib/python3.6/site-packages/adversarial/gen_transformed_images.py", line 14, in from lib.defenses import get_defense File "/home/shangqian/anaconda3/lib/python3.6/site-packages/adversarial/lib/defenses.py", line 20, in from lib.transformations.quilting_fast import quilting File "/home/shangqian/anaconda3/lib/python3.6/site-packages/adversarial/lib/transformations/quilting_fast.py", line 17, in QUILTING_LIB = ctypes.cdll.LoadLibrary(os.path.join(os.path.dirname(file), "libquilting.so")) File "/home/shangqian/anaconda3/lib/python3.6/ctypes/init.py", line 426, in LoadLibrary return self._dlltype(name) File "/home/shangqian/anaconda3/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: /home/shangqian/anaconda3/lib/python3.6/site-packages/adversarial/lib/transformations/libquilting.so: cannot open shared object file: No such file or directory

lvdmaaten commented 6 years ago

We only support Python 2.7 and PyTorch v0.2.0 at the moment -- with other versions, your mileage may vary.

I'm guessing this some issue related to where Python expects libraries to located (which may vary between v2 and 3).

gaosh commented 6 years ago

Ok, thanks for your answer.