microsoft / microsoft/vscode-python-environments

Quick Create fails to install packages

Đang mở
#367 4 bình luận 1 reaction 1 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

feature-request help wanted needs PR
Ngôn ngữ chính
TypeScript
Star
138
Fork
62
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
35

Mô tả

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]

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.