Command not found after installing wheel?

I’m using poetry to build a project into a wheel.

$ poetry build

I go to install the wheel so that I can access the program from any directory on my computer like so:

$ python3 -m pip install --user myprogram-0.1.0-py3-none-any.whl

Then I go to use my program and it’s not found:

$ myprogram
zsh: command not found: myprogram

I reloaded my shell just to cover my bases and that didn’t work.

I went looking to see if my package had actually been installed. I looked in the following directories:

~/.local/bin
~/.local/lib/python3.7/site-packages

It looks like my package isn’t getting installed at all. Can someone help me figure out what’s going on?

I’m using Python 3.7.5 and pip 18.1.

A wheel is just a zip file containing your package and some metadata. Check to make sure everything you expect is in there

When you’re installing, run PIP with verbose logging (-v flag) to see what’s going on

Is the .dist-info directory being copied into site-packages?

You might want to upgrade to the latest PIP just to be safe

It looks like everything is present in the wheel. There’s no dist-info directory created for my program. The output of pip says

Requirement already satisfied: myprogram==0.1.0 from file:///path/to/project/dist/myprogram-<...>.whl in /path/to/project

To me that says that pip thinks it can just leave the wheel there rather than installing it to the site-packages directory.

Some more troubleshooting:

Try installing it in a fresh virtual environment. If that works, then I’d suggest uninstalling your package multiple times.

I’ve heard tales of having a package installed as a zip, specifically as an .egg file. Other than that, I didn’t know it was possible for a file to satisfy a requirement