Skip to content
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

--no-install-project being ignored during a sync #12265

Open
VERBOSE-01 opened this issue Mar 18, 2025 · 2 comments
Open

--no-install-project being ignored during a sync #12265

VERBOSE-01 opened this issue Mar 18, 2025 · 2 comments
Labels
needs-mre Needs more information for reproduction

Comments

@VERBOSE-01
Copy link

VERBOSE-01 commented Mar 18, 2025

Question

I'm trying a partial installation (all dependencies, except my project) using the --no-install-project flag but unfortunately, uv still tries to install the project itself.

Tree

> my_personal_project
--> # src folders and files
--> pyproject.toml
--> .python-version

Terminal

PS C:\Users\verbose\Desktop\my_personal_project> uv sync --no-install-project
Using CPython 3.13.2 interpreter at: C:\Users\verbose\AppData\Local\Programs\Python\Python313\python.exe
Creating virtual environment at: .venv
⠋ my_personal_project==1.3.1

.python-version

3.13.2

pyproject.toml

[project]
name = "my_personal_project"
version = "1.3.1"
authors = [
    { name = "VERBOSE", email = "[email protected]" },
]
requires-python = ">=3.10"
dependencies = [
    "beautifulsoup4==4.12.2",
    "openpyxl==3.1.5",
    # ... others
]

[dependencies-groups]
dev = [
    "pytest==6.2.5",
    "ruff==0.11.0",
]

Some context

I'm dropping requirements.txt and requirements-dev.txt in favor of uv.lock. It means that I have no reqs files anymore and the pyproject.toml was created manually (before installing uv).

Platform

Windows 10

Version

0.6.7

@VERBOSE-01 VERBOSE-01 added the question Asking for clarification or support label Mar 18, 2025
@charliermarsh
Copy link
Member

It looks like we're resolving your project (which we'd need to do for dependency resolution) but we may not be installing it. Can you please create a complete reproduction -- like a GitHub repository we can clone and a set of commands we can run?

@charliermarsh charliermarsh added needs-mre Needs more information for reproduction and removed question Asking for clarification or support labels Mar 18, 2025
@VERBOSE-01
Copy link
Author

It looks like we're resolving your project (which we'd need to do for dependency resolution) but we may not be installing it. Can you please create a complete reproduction -- like a GitHub repository we can clone and a set of commands we can run?

Many thanks for taking the time. I'm afraid I won't be able to make a MRE because it isn't an issue for me anymore. Maybe it's completely random but I just did the following steps (see below) and uv installed all dependencies and created a uv.lock successfully:

  1. run $env:HTTPS_PROXY = "http://..." since I'm behind a proxy (as suggested here)
  2. deleted the old .venv (created earlier by uv sync --no-install-project)
  3. replaced [dependencies-groups] with dependency-groups in the pyproject.toml
  4. created a new .venv and this time with uv venv --seed (as suggested here because my pip install was ignoring .venv)
  5. re run uv sync (without any flag this time)

Vscode terminal (powershell)

PS C:\Users\verbose\Desktop\my_personal_project> $env:HTTPS_PROXY = "http://..."

PS C:\Users\verbose\Desktop\my_personal_project> uv venv --seed
Using CPython 3.13.2 interpreter at: C:\Users\verbose\AppData\Local\Programs\Python\Python313\python.exe
Creating virtual environment with seed packages at: .venv
 + pip==25.0.1
Activate with: .venv\Scripts\activate

PS C:\Users\verbose\Desktop\my_personal_project> uv sync
Using CPython 3.13.2 interpreter at: C:\Users\verbose\AppData\Local\Programs\Python\Python313\python.exe
Creating virtual environment at: .venv
Resolved x packages in xms

Sorry again and thanks for this tool. A game changer, honestly ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-mre Needs more information for reproduction
Projects
None yet
Development

No branches or pull requests

2 participants