N
N
NitroDesktop2020-06-15 12:09:12
Python
NitroDesktop, 2020-06-15 12:09:12

How to fix pip after reinstalling Windows?

I'm already trying different modules in different ways, but each one has errors, I can't anymore ...

pip install dlib --user
Collecting dlib
  Using cached dlib-19.20.0.tar.gz (3.2 MB)
Using legacy setup.py install for dlib, since package 'wheel' is not installed.
Installing collected packages: dlib
    Running setup.py install for dlib ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\admin\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'R:\\Temp\\pip-install-7r7ld0gz\\dlib\\setup.py'"'"'; __file__='"'"'R:\\Temp\\pip-install-7r7ld0gz\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'R:\Temp\pip-record-elrbnfpb\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Admin\AppData\Roaming\Python\Python38\Include\dlib'
         cwd: R:\Temp\pip-install-7r7ld0gz\dlib\
    Complete output (55 lines):
    running install
    running build
    running build_py
    package init file 'dlib\__init__.py' not found (or not a regular file)
    running build_ext
    Traceback (most recent call last):
      File "R:\Temp\pip-install-7r7ld0gz\dlib\setup.py", line 120, in get_cmake_version
        out = subprocess.check_output(['cmake', '--version'])
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\subprocess.py", line 411, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\subprocess.py", line 489, in run
        with Popen(*popenargs, **kwargs) as process:
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\subprocess.py", line 1307, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] Не удается найти указанный файл

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "R:\Temp\pip-install-7r7ld0gz\dlib\setup.py", line 223, in <module>
        setup(
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\admin\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "R:\Temp\pip-install-7r7ld0gz\dlib\setup.py", line 129, in run
        cmake_version = self.get_cmake_version()
      File "R:\Temp\pip-install-7r7ld0gz\dlib\setup.py", line 122, in get_cmake_version
        raise RuntimeError("\n*******************************************************************\n" +
    RuntimeError:
    *******************************************************************
     CMake must be installed to build the following extensions: dlib
    *******************************************************************

    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\admin\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'R:\\Temp\\pip-install-7r7ld0gz\\dlib\\setup.py'"'"'; __file__='"'"'R:\\Temp\\pip-install-7r7ld0gz\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'R:\Temp\pip-record-elrbnfpb\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Admin\AppData\Roaming\Python\Python38\Include\dlib' Check the logs for full command output.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Karbivnichy, 2020-06-15
@NitroDesktop

Try installing another wheel:
pip install wheel --user

N
NitroDesktop, 2020-06-15
@NitroDesktop

Damn, I have not seen this before, everything does not work normally ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question