tag:help.appveyor.com,2012-11-13:/discussions/problems/26304-error-could-not-install-packages-due-to-an-environmenterrorAppVeyor: Discussion 2020-02-16T03:12:01Ztag:help.appveyor.com,2012-11-13:Comment/480925212020-02-16T03:12:00Z2020-02-16T03:12:01ZERROR: Could not install packages due to an EnvironmentError:<div><p>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.<br>
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.</p>
<pre>
<code>%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\\2015-05-26-staff@noreply.openkim.org\\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\\2015-05-26-staff@noreply.openkim.org\\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\\\\2015-05-26-staff@noreply.openkim.org\\\\cohesive-energy-lattice-invariant-shear-unrelaxed-path-cubic-crystal.edn'")</code>
</pre>
<p>I already added<br>
<code>Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1</code> to the <code>install</code> part as:</p>
<pre>
<code>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</code>
</pre>
<p>Can anyone help me with this issue?</p></div>Yaser