Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install dhash via python pip




dhash - Calculate difference hash (perceptual hash) for a given image, useful for detecting duplicates, it belongs to Classifiers:

- Topic :: Multimedia
- Topic :: Multimedia :: Graphics

When you know about this project and you want to new install dhash to support your project or you get trouble as ModuleNotFoundError: No module named "dhash" or ImportError: cannot import name "dhash" in your project, let follow this tutorial to install dhash



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_dhash_env

- Active the virtual environment

test_dhash_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_dhash_env

- Active the virtual environment

source test_dhash_env/bin/active


Step 2: OK, now, let flow below content to start the installation dhash

To install dhash on Windows(CMD):

py -m pip install dhash

To install dhash on Unix/macOs:

pip install dhash


Step 3: If you want to install a specific dhash version, add ==<dhash version> to the end command line

Example:

pip install dhash==1.0


Please see the version list below table:

VersionReleased dateCommand
dhash 1.32017-08-23T12:48:15Windows:

py -m pip install dhash==1.3

Unix/macOs:

pip install dhash==1.3

dhash 1.22017-08-22T13:36:47Windows:

py -m pip install dhash==1.2

Unix/macOs:

pip install dhash==1.2

dhash 1.12017-01-31T19:19:09Windows:

py -m pip install dhash==1.1

Unix/macOs:

pip install dhash==1.1

dhash 1.02017-01-31T18:23:22Windows:

py -m pip install dhash==1.0

Unix/macOs:

pip install dhash==1.0


Step 4: Otherwise, you can install dhash from local archives:

Download the distribution file from dhash-1.3.tar.gz or the specific dhash version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_dhash_downloaded_file>

On Unix/macOs:

pip install <path_to_dhash_downloaded_file>


List distribution:

- dhash-1.0.tar.gz
- dhash-1.1.tar.gz
- dhash-1.2.tar.gz
- dhash-1.3.tar.gz
- dhash-1.4-py3-none-any.whl
- dhash-1.4.tar.gz


Project link:

- Homepage