Trouble installing the Distant Viewing Toolkit

I am trying to install the Distant Viewing Toolkit for a Python project that I would like to work on. Here is the GitHub for it: GitHub - distant-viewing/dvt: Distant Viewing Toolkit for the Analysis of Visual Culture

I successfully installed the following dependencies, which should allow me to perform the functions in the toolkit:

pip install opencv-python
pip install torch torchvision torchaudio
pip install git+https://github.com/distant-viewing/dvt.git@main

However, when I open Python and type “import dvt,” I receive the following message: ModuleNotFoundError: No module named ‘dvt’

The version of Python I am using is 3.12.3. and I am working on a Mac (MacOS Ventura). I’m not certain what step I’ve missed. If anyone could give me an idea, I’d be grateful. Thanks in advance.

It’s almost certainly the same problem as almost everyone else who asks a similar question: because of how your system is configured, pip does not install for the same copy of Python, as the Python that you run using python. Either or both of these may be different from what you believe they actually are. Check the results of:

which pip
which python
python -c "import sys; print(sys.executable)" ← a double-check for which python
pip list ← use this one to make sure the installations actually succeeded

To make sure that Pip installs for the same version of Python that python runs, use python -m pip in place of pip in your commands. However, this may not be the version of Python you want to use.

The usual reason for this kind of thing is that pip has installed into
a different Python than the version you’re using when you’re running
Python, and so the modules are not found by the running version.

Can you show us exactly what ‘I open Python and type “import dvt,”’
means for you?

That said, the standard approach here it to ensure that you’re using the
pip associated with the Python you’re running, by invoking pip like
this:

 python -m pip install opencv-python

adjusting python to be whichever Python you’re running. For example
here (also MacOS Ventura) the stock Python is python3 aka
/usr/bin/python3, which is 3.9.6.

So I’m inferring that you’ve got a separate Python install for 3.12.3.
Make sure that you’re running that Python to do the pip stuff.