microsoft / microsoft/vscode-python-environments

Quick Create fails to install packages

Offen
#367 4 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature-request help wanted needs PR
Vorherrschende Sprache
TypeScript
Sterne
138
Forks
62
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
35

Beschreibung

I am tried to run Quick Create at the root of vscode-python-templates and package install failed. Is this because it is using all requirements files and cannot resolve?

The environment still got created just not with the packages. I had to reference the environment managers venv list in order for the environment to show up in this case. How can we better resolve the environment in this scenario?

If there are multiple requirements files should we be attempting to install everything with Quick Create?

Output
2025-04-29 14:56:23.006 [info] python: Getting requirements to build editable: started

2025-04-29 14:56:23.465 [info] python: Getting requirements to build editable: finished with status 'error'

2025-04-29 14:56:23.470 [info] python: error: subprocess-exited-with-error

2025-04-29 14:56:23.471 [info] python: Getting requirements to build editable did not run successfully.
exit code: 1

[54 lines of output]
configuration error: `project.name` must be pep508-identifier
DESCRIPTION:
The name (primary identifier) of the project. MUST be statically defined.

GIVEN VALUE:
"Package Template"

OFFENDING RULE: 'format'

DEFINITION:
{
"type": "string",
"format": "pep508-identifier"
}

For more details about `format` see
https://validate-pyproject.readthedocs.io/en/latest/api/validate_pyproject.formats.html

Traceback (most recent call last):
File "C:\vscode-python-templates-main\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in

2025-04-29 14:56:23.471 [info] python: main()
File "C:\vscode-python-templates-main\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\vscode-python-templates-main\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 157, in get_requires_for_build_editable
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\build_meta.py", line 473, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
exec(code, locals())
File "", line 1, in
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 160, in setup
dist.parse_config_files()
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\dist.py", line 756, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py", line 72, in apply_configuration
config = read_configuration(filepath, True, ignore_option_errors, dist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py", line 140, in read_configuration
validate(subset, filepath)
File "C:\Users\cowebster\AppData\Local\Temp\pip-build-env-q6fcdwnm\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py", line 61, in validate
raise ValueError(f"{error}\n{summary}") from None
ValueError: invalid pyproject.toml config: `project.name`.
2025-04-29 14:56:23.471 [info] python:
configuration error: `project.name` must be pep508-identifier
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

2025-04-29 14:56:24.039 [info] python:
[notice] A new release of pip is available: 25.0.1 -> 25.1
[
2025-04-29 14:56:24.039 [info] python: notice] To update, run: C:\vscode-python-templates-main\.venv\Scripts\python.exe -m pip install --upgrade pip

2025-04-29 14:56:24.041 [info] python: error: subprocess-exited-with-error

Getting requirements to build editable did not run successfully.
exit code: 1

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

2025-04-29 14:56:24.250 [error] Error managing packages Failed to run python -m pip install -r c:\vscode-python-templates-main\data-science-template\dev-requirements.txt -r c:\vscode-python-templates-main\data-science-template\requirements.txt -r c:\vscode-python-templates-main\django-template\requirements.txt -r c:\vscode-python-templates-main\fastapi-template\dev-requirements.txt -r c:\vscode-python-templates-main\fastapi-template\requirements.txt -r c:\vscode-python-templates-main\flask-template\dev-requirements.txt -r c:\vscode-python-templates-main\flask-template\requirements.txt -r c:\vscode-python-templates-main\package-template\dev-requirements.txt -r c:\vscode-python-templates-main\script-template\dev-requirements.txt -e c:\vscode-python-templates-main\package-template -e .[dev-requirements] -e .[dev-requirements] -e .[dev-requirements]
2025-04-29 14:56:24.252 [error] Failed to create virtual environment: Error: Failed to run python -m pip install -r c:\vscode-python-templates-main\data-science-template\dev-requirements.txt -r c:\vscode-python-templates-main\data-science-template\requirements.txt -r c:\vscode-python-templates-main\django-template\requirements.txt -r c:\vscode-python-templates-main\fastapi-template\dev-requirements.txt -r c:\vscode-python-templates-main\fastapi-template\requirements.txt -r c:\vscode-python-templates-main\flask-template\dev-requirements.txt -r c:\vscode-python-templates-main\flask-template\requirements.txt -r c:\vscode-python-templates-main\package-template\dev-requirements.txt -r c:\vscode-python-templates-main\script-template\dev-requirements.txt -e c:\vscode-python-templates-main\package-template -e .[dev-requirements] -e .[dev-requirements] -e .[dev-requirements]

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.