asreview / asreview

Active learning for systematic reviews

Home Page:https://asreview.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when installing using pip

ThomasMeisters opened this issue · comments

Describe the bug
I get the following error while installing ASReview using pip:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\Users\************\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\asreview\webapp\build\static\media\asreview_sub_logo_lab_black_transparent.c4e14af313ba97465fff113a6b2e4fd7.svg'
(I replaced my username in the directory with ********)

To Reproduce
python -m pip install asreview

Version information

  • OS: Windows 11
  • ASReview version 1.6.2

Additional context
I run powershell without admin privileges (because I don't have admin privileges on my work pc).

PS C:\Users\jelle> systeminfo | findstr /B /C:"OS Name"
OS Name:                   Microsoft Windows 11 Home
PS C:\Users\jelle> pip install asreview==1.6.2
Downloading asreview-1.6.2-py3-none-any.whl (3.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 13.1 MB/s eta 0:00:00
Downloading waitress-3.0.0-py3-none-any.whl (56 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.7/56.7 kB ? eta 0:00:00
Installing collected packages: waitress, asreview
  Attempting uninstall: asreview
    Found existing installation: asreview 1.5
    Uninstalling asreview-1.5:
      Successfully uninstalled asreview-1.5
Successfully installed asreview-1.6.2 waitress-3.0.0

I am running into no such issues, also not in administrator mode.

@ThomasMeisters a possible issue could be the path length restrictions on windows. I cannot verify this since you changed the username in the directory, but counting the path it's close to 260 characters.

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

It could be that the file is not written because the path is over 260 characters, failing the setup.

Try running the following in Powershell:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

@J535D165 asreview\webapp\build\static\media\asreview_sub_logo_lab_black_transparent.svg is one of the longest paths we have. Guessing this is the issue for this user.

Another option could be that the path has special restrictions (it's a work laptop after all). Try installing in your user directory: python -m pip install --user asreview, maybe this also results in a shorter path.

The path with my username is 276 characters, so that's probably the issue. I can't make registry edits myself, so I'll ask IT if they can do this for me. Thanks for the quick response!

Feel free to reopen if the issue persists. Thanks @jteijema for helping out