解决Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:'x.pyc'

windows系统下使用pip安装库时可能会遇到以下问题:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\xxx\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\tensorboard\\_vendor\\tensorflow_serving\\sources\\storage_path\\__pycache__\\file_system_storage_path_source_pb2.cpython-37.pyc'

遇到这个问题的原因大概是由于系统不支持长路径,解决方法是只需要在注册表中修改HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled值为1即可

你可能感兴趣的:(python,error)