Dimpik
@Dimpik

Вылетает ошибка при установке pip: Error: Exception: Как решить?

Пытаюсь установить pip через cmd. Вываливает ошибку:

ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\distutils\util.py", line 205, in subst_vars
return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s)
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\re.py", line 210, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\distutils\util.py", line 202, in _subst
return os.environ[var_name]
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'PC'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\cli\base_command.py", line 173, in _main
status = self.run(options, args)
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\cli\req_command.py", line 203, in wrapper
return func(self, options, args)
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\commands\install.py", line 239, in run
options.use_user_site = decide_user_install(
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\commands\install.py", line 652, in decide_user_install
if site_packages_writable(root=root_path, isolated=isolated_mode):
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\commands\install.py", line 598, in site_packages_writable
get_lib_location_guesses(root=root, isolated=isolated))
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\commands\install.py", line 584, in get_lib_location_guesses
scheme = get_scheme(
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\locations\__init__.py", line 159, in get_scheme
old = _distutils.get_scheme(
File "C:\Users\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\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\D1ma$PC\AppData\Local\Temp\tmp7s6zlno2\pip.zip\pip\_internal\locations\_distutils.py", line 69, in distutils_scheme
i.finalize_options()
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\distutils\command\install.py", line 308, in finalize_options
self.expand_basedirs()
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\distutils\command\install.py", line 476, in expand_basedirs
self._expand_attrs(['install_base', 'install_platbase', 'root'])
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\distutils\command\install.py", line 470, in _expand_attrs
val = subst_vars(val, self.config_vars)
File "C:\Users\D1ma$PC\AppData\Local\Programs\Python\Python39\lib\distutils\util.py", line 207, in subst_vars
raise ValueError("invalid variable '$%s'" % var)
ValueError: invalid variable '$'PC''

Версия python : 3.9
  • Вопрос задан
  • 1398 просмотров
Решения вопроса 1
sergey-gornostaev
@sergey-gornostaev
Седой и строгий
Не устанавливать Python в каталоги, путь к которым содержит символы отличные от букв латинского алфавита и цифр.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы