-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError when installing wheel from own local python package #390
Comments
Yea, it seems like typer is super rigid on the exact directory structure here. I'm running into the same issues with practically any modifications to the directory structure listed in the example here In order to get it to work, I had to make my module match the app name, and had to move all of my commands into the top level module, which is not really a scalable solution :( |
Though, it seems like this is possibly more of a poetry question than a typer question? not sure ultimately how much control typer has over the install process. |
@unredundant I was able to get it to work with all relevant files being (nested) inside a subdirectory which hosts
If I understand you correctly you got it only to work with a flat file structure (no subdirectories)? For me it works with the shown structure! |
Interesting... I'll have to play around with this more. Glad you got it working :) means I can't be far off |
Took me a while to get it working for me, but managed alright! My project structure looks like this:
Had to change pyproject.toml like this:
That way after installing my package with |
First Check
Commit to Help
Example Code
Description
My goal is to have a command line tool that's available everywhere and that mostly wraps other CLI programs.
I followed the example guide on how to create
typer
programs and how to build a package from it. For now, it should be installed from a local wheel usingpipx
.poetry install
,poetry build
andpipx install ...
all work, it's found in thePATH
afterwards, but if I try to run it I getI have the
__init__.py
incommands/
, but it seems to mess that up in the process somehow, it does not copy these files into the directory it reports for thepipx venv
path. Has anyone experienced something like this?Operating System
Linux
Operating System Details
Linux Mint 20
Typer Version
0.4.1
Python Version
3.10.2
Additional Context
No response
The text was updated successfully, but these errors were encountered: