Lakshmipathi / dduper

Fast block-level out-of-band BTRFS deduplication tool.
GNU General Public License v2.0
168 stars 18 forks source link

enum34 not in requirements.txt #5

Closed illwieckz closed 4 years ago

illwieckz commented 4 years ago
(venv) root@box:~/dduper# ./dduper --device /dev/mapper/something --dir /mnt/something
Traceback (most recent call last):
  File "./dduper", line 28, in <module>
    from beautifultable import BeautifulTable
  File "/root/dev/dduper/venv/lib/python2.7/site-packages/beautifultable/__init__.py", line 5, in <module>
    from .beautifultable import (  # noqa F401
  File "/root/dev/dduper/venv/lib/python2.7/site-packages/beautifultable/beautifultable.py", line 34, in <module>
    from . import enums
  File "/root/dev/dduper/venv/lib/python2.7/site-packages/beautifultable/enums.py", line 2, in <module>
    import enum
ImportError: No module named enum

pip install enum34 fixed the issue on my end

Lakshmipathi commented 4 years ago

@illwieckz I think this is related to your other python3 port issue. Let me check some work around of this issue.

Lakshmipathi commented 4 years ago

@illwieckz , Let me know your distro name and version. I'll check for workaround.

illwieckz commented 4 years ago

Ubuntu 20.04 LTS “Focal Fossa”

Lakshmipathi commented 4 years ago

thanks. Can you edit your requirements.txt and do pip install -r requirements.txt like below and give it try again? please make sure to remove your previous python modules like enum34 or simple check this from an new py2.7 venv.

diff --git a/requirements.txt b/requirements.txt
index c6c2a52..2def892 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
 numpy
-beautifultable
+beautifultable==0.8.0

Above changes worked on Ubuntu 20.04

(myenv) root@ubuntu-s-1vcpu-1gb-blr1-01:~/dduper# ./dduper --device /dev/sda --files /mnt/a1 /mnt/a2 --analyze
Perfect match :  /mnt/a1 /mnt/a2
Perfect match :  /mnt/a1 /mnt/a2              
Perfect match :  /mnt/a1 /mnt/a2              
Perfect match :  /mnt/a1 /mnt/a2              
Perfect match :  /mnt/a1 /mnt/a2              
Perfect match :  /mnt/a1 /mnt/a2              
--------------------------------------------------
 Chunk Size(KB) :      Files      : Duplicate(KB) 
--------------------------------------------------
      256       : /mnt/a1:/mnt/a2 :     51200     
==================================================
dduper:51200KB of duplicate data found with chunk size:256KB 
(myenv) root@ubuntu-s-1vcpu-1gb-blr1-01:~/dduper# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal
illwieckz commented 4 years ago

Ok, that works with a brand new virtualenv done this way:

virtualenv -p /usr/bin/python2.7 venv

I was not able to get my initial virtualenv working, but a new one works.

Thanks!

Lakshmipathi commented 4 years ago

great thanks for the confirmation :+1: I'll go ahead and mark this as resolved, please feel free to report any other issues with dduper.