-
-
Notifications
You must be signed in to change notification settings - Fork 49.6k
Closed
Description
On python 3.9.7, with pre-commit 2.15.0 and black 21.9b0
No problem when using flake8, black and mypy.
As the title said, I can't commit because when i use pre-commit run --all-files --show-diff-on-failure, pre-commit want to install the environment for black but don't manage to. What should i do?
I'm not sure it should be there, but i figured you should know.
Here's the whole output:
C:\Users\leoriem\Documents\Github\Python> pre-commit run --all-files --show-diff-on-failure
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('C:\\Users\\leoriem\\.cache\\pre-commit\\repocy0rbx3j\\py_env-python3\\Scripts\\python.EXE', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
Processing c:\users\leoriem\.cache\pre-commit\repocy0rbx3j
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
stderr:
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
ERROR: Command errored out with exit status 2:
command: 'C:\Users\leoriem\.cache\pre-commit\repocy0rbx3j\py_env-python3\Scripts\python.EXE' 'C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\leoriem\AppData\Local\Temp\pip-build-env-jwzldvl8\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=41.0' setuptools-scm wheel
cwd: None
Complete output (32 lines):
Collecting setuptools>=41.0
Using cached setuptools-58.2.0-py3-none-any.whl (946 kB)
Collecting setuptools-scm
Using cached setuptools_scm-6.3.2-py3-none-any.whl (33 kB)
Collecting wheel
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting packaging>=20.0
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting tomli>=1.0.0
Using cached tomli-1.2.1-py3-none-any.whl (11 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Installing collected packages: pyparsing, tomli, setuptools, packaging, wheel, setuptools-scm
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\cli\base_command.py", line 173, in _main
status = self.run(options, args)
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\cli\req_command.py", line 203, in wrapper
return func(self, options, args)
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\commands\install.py", line 390, in run
installed = install_given_reqs(
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\req\__init__.py", line 73, in install_given_reqs
requirement.install(
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\req\req_install.py", line 723, in install
scheme = get_scheme(
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\locations\__init__.py", line 193, in get_scheme
old = _distutils.get_scheme(
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\locations\_distutils.py", line 130, in get_scheme
scheme = distutils_scheme(dist_name, user, home, root, isolated, prefix)
File "C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip\_internal\locations\_distutils.py", line 62, in distutils_scheme
assert not (home and prefix), f"home={home} prefix={prefix}"
AssertionError: home=C:\Users\leoriem\AppData\Local\Temp\pip-target-lot3iku4 prefix=C:\Users\leoriem\AppData\Local\Temp\pip-build-env-jwzldvl8\overlay
----------------------------------------
WARNING: Discarding file:///C:/Users/leoriem/.cache/pre-commit/repocy0rbx3j. Command errored out with exit status 2: 'C:\Users\leoriem\.cache\pre-commit\repocy0rbx3j\py_env-python3\Scripts\python.EXE' 'C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\leoriem\AppData\Local\Temp\pip-build-env-jwzldvl8\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.
ERROR: Command errored out with exit status 2: 'C:\Users\leoriem\.cache\pre-commit\repocy0rbx3j\py_env-python3\Scripts\python.EXE' 'C:\Users\leoriem\AppData\Local\Temp\pip-standalone-pip-8pxqtv67\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\leoriem\AppData\Local\Temp\pip-build-env-jwzldvl8\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.
Check the log at C:\Users\leoriem\.cache\pre-commit\pre-commit.log
tanluutrong2206
Metadata
Metadata
Assignees
Labels
No labels