Reputation: 517
I am trying to install Jupyter Notebook on my Windows 11 machine using Python 3.11.4, but I encounter an OSError with the message:
[Errno 2] No such file or directory.
I have already tried different installation commands, including pip install notebook
, pip install notebook --user
, and python -m pip install jupyter
, but none of them resolved the issue.
Error details:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\Users\1234\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\jedi\third_party\typeshed\third_party\2and3\requests\packages\urllib3\packages\ssl_match_hostname\_implementation.pyi'
I have also referred to the following Stack Overflow links, but the solutions provided did not help me resolve the issue:
How to resolve this OSError and successfully install Jupyter Notebook on Python 3.11 running on Windows 11?
I have verified that my pip version is 23.2.1 and tried to install Jupyter Notebook using both system-wide and user-specific installation options, but the error persists.
Upvotes: 1
Views: 1510
Reputation: 1
Avoid installing python from Microsoft Store. Reinstall instead the last version with the .exe from the official site
Upvotes: 0
Reputation: 41
The issue is likely due to the long file path limitation in Windows. I encountered the same problem and resolved it by enabling the long path support in the Windows Registry.
Here’s how you can do it:
Open the Registry Editor. You can do this by typing regedit in the Run dialog (Win + R) and pressing Enter.
Navigate to the following path:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Find the entry named LongPathsEnabled.
Double-click on LongPathsEnabled and change its value from 0 to 1.
Click OK and close the Registry Editor.
After making this change, the long path support should be enabled, and your problem should be resolved.
Upvotes: 2