Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation fails with error: could not create 'build\bdist.win-amd64\wheel\.\idaes\core\surrogate\tests\data\onnx_models\net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06 _4096_tr_15481_Calcite_ST_idaes_info.json': No such file or directory #1540

Open
lbianchi-lbl opened this issue Nov 22, 2024 · 2 comments · May be fixed by #1541
Assignees
Labels
bug Something isn't working Priority:High High Priority Issue or PR

Comments

@lbianchi-lbl
Copy link
Contributor

lbianchi-lbl commented Nov 22, 2024

@lbianchi-lbl
Copy link
Contributor Author

I was able to confirm that this is indeed caused by file path length limitations:

  1. In a Powershell prompt, run the following "cmdlet" to check whether long paths are supported or not (0: long paths not supported; 1: long paths supported):
Get-ItemProperty -Path "HKLM:System\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled"
  1. Run the pip install command above (it should fail if LongPathsEnabled is 0)
  2. Open a Powershell prompt with "Run as Administrator" to enable support for long paths:
Set-ItemProperty -Path "HKLM:System\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
  1. Run the pip install command above, which should now pass

For more information: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

@lbianchi-lbl
Copy link
Contributor Author

From more testing, I think I figured out the exact path that causes the error, at 262 characters when the default length without LongPathsEnabled is 260:

C:\Users\lbian\AppData\Local\Temp\pip-install-is8sb24x\idaes-pse_f27d74dd25594348bdef5015371f125f\build\bdist.win-amd64\wheel\.\idaes\core\surrogate\tests\data\onnx_models\net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST_idaes_info.json

Assuming this is true, and that the pattern for name mangling that pip uses is fixed in length, then the filename just happens to be long enough to go over the threshold by 2 characters 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority:High High Priority Issue or PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant