Open 5183nischal opened 2 months ago
:+1: I got this problem often as well
If you want the template project to be created with an importable directory like that you, consider using uv init trials --lib
. By default, we create an --app
, which just contains runnable scripts as opposed to a buildable project. \cc @zaneib
If you want the template project to be created with an importable directory like that you, consider using
uv init trials --lib
. By default, we create an--app
, which just contains runnable scripts as opposed to a buildable project. \cc @zaneib
But I do initialize it with the --lib
!
Oh sorry -- I missed that. I can't reproduce this though.
Oh sorry -- I missed that. I can't reproduce this though.
Yes, I can't reproduce this everywhere in my own computer either. Only when I'm under ~/Documents
in my computer I get this error. Want to understand if you guys would have an idea why that might be happening.
I'm experiencing the same issue on windows, a different folder with an existing project migrated from pdm. It looks like the local package was not installed under some condition before running the command.
I also tried do it manually by running uv add --dev --editable .
at first, then manually enter the virtual environment ./.venv/Scripts/activate
, still the local module was not found.
But when I deleted pyproject.toml
and reinitialized the project uv init --lib
and ran uv sync
before copying the existing dependencies list to pyproject.toml
, it started working. And afterwards, I copied the existing dependencies and it worked as usual.
The following error occurs when I initialize a project under
~/Documents
but not say under~/Downloads
(in macos).Initialize a new project using
uv
: I initialized a new project namedtrials
using theuv
command.Output:
Navigate to the project directory: I changed the directory to the newly created
trials
project.Run Python command to import the
trials
module: I attempted to run a Python command to import thetrials
module usinguv
.Output:
Run the same command again: I ran the same command again to import the
trials
module.Output:
Issue
After initializing the project and running the command to import the
trials
module, I encountered aModuleNotFoundError
. It seems that thetrials
module is not being recognized, even though the project was initialized successfully.Expected Behavior
The
trials
module should be importable after initializing the project and running the command.Actual Behavior
The
trials
module is not found, resulting in aModuleNotFoundError
.Verbose Output
I ran the command with the
-v
(verbose) flag to get more detailed output:Verbose Output:
Thanks in advance!