ERROR: Could not install packages due to an EnvironmentError:

Yaser's Avatar

Yaser

16 Feb, 2020 03:12 AM

In my python code, I have a folder for some metadata that I used inside the code. The files are supposed to be in a specific folder structure and have long names.
Installing and testing the package has no problem with macOS and Linux, but here on windows and using AppVeyor I am getting this error message.

````
%PYTHON%\python.exe -m pip install .
Processing c:\projects\kim-property
ERROR: Could not install packages due to an EnvironmentError: [('C:\\projects\\kim-property\\kim_property\\properties\\cohesive-energy-lattice-invariant-shear-unrelaxed-path-cubic-crystal\\[email blocked]\\cohesive-energy-lattice-invariant-shear-unrelaxed-path-cubic-crystal.edn', 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\pip-req-build-w23pq61s\\kim_property\\properties\\cohesive-energy-lattice-invariant-shear-unrelaxed-path-cubic-crystal\\[email blocked]\\cohesive-energy-lattice-invariant-shear-unrelaxed-path-cubic-crystal.edn', "[Errno 2] No such file or directory: 'C:\\\\Users\\\\appveyor\\\\AppData\\\\Local\\\\Temp\\\\1\\\\pip-req-build-w23pq61s\\\\kim_property\\\\properties\\\\cohesive-energy-lattice-invariant-shear-unrelaxed-path-cubic-crystal\\\\[email blocked]\\\\cohesive-energy-lattice-invariant-shear-unrelaxed-path-cubic-crystal.edn'")
````

I already added
````
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
````
to the `install` part as:

````
install:
  - ps: Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
  - ps: Start-Sleep -s 10
  - ps: Restart-Computer -Force
  - ps: Start-Sleep -s 10
````

Can anyone help me with this issue?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac