Could not install packages due to an OSError on Windows

While you try to install a Python dependency, you encounter this error:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: /home/ā€¦

One of the reasons can be a too long path leading to your project. If it's the case, you can:

  1. Open the Registry Editor, e.g. by typiying "Registry Editor" in the Search box
  2. Naviage to Computer > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > FileSystem
  3. Set the "LongPathsEnabled" to 1