This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients Jonas Binding, Marcus.Smith, dstufft, ncoghlan, paul.moore, pradyunsg, steve.dower, tim.golden, zach.ware
Date 2019-08-05.22:24:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565043863.47.0.195554183581.issue37769@roundup.psfhosted.org>
In-reply-to
Content
Short of adding a popup into Python itself the first time you run it (and would that include if you run "pip" first?), we don't have any ability to extend the installer.

We could reduce the "local-packages/Python37/site-packages" part of the path by implementing an alternative way (in both Python and pip, presumably) to specify the user's site packages. Right now, the best I can do is reduce "local-packages" down to a single character (in PC/python_uwp.cpp ) - the rest is forcibly added by the shared part of the runtime.

Since pip is likely to be the first place users hit this, it might be easiest to start by adding a more descriptive error message. Copying from the other bug:

pip3 install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-win_amd64.whl
fails with an error message:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\[username]\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\caffe2\\python\\serialized_test\\data\\operator_test\\collect_and_distribute_fpn_rpn_proposals_op_test.test_collect_and_dist.zip'

First it seems the error is being raised incorrectly - winerror 2 is for file not found, but it's being passed as errno 2. But otherwise it should be possible to detect this case, see that the path is too long on Windows and point users at https://docs.python.org/3/using/windows.html#removing-the-max-path-limitation
History
Date User Action Args
2019-08-05 22:24:23steve.dowersetrecipients: + steve.dower, paul.moore, ncoghlan, tim.golden, zach.ware, dstufft, pradyunsg, Marcus.Smith, Jonas Binding
2019-08-05 22:24:23steve.dowersetmessageid: <1565043863.47.0.195554183581.issue37769@roundup.psfhosted.org>
2019-08-05 22:24:23steve.dowerlinkissue37769 messages
2019-08-05 22:24:23steve.dowercreate