简体   繁体   English

尝试安装时遇到权限问题 TensorFlow

[英]Encountering permissions issue when trying to install TensorFlow

I'm trying to install TensorFlow and I'm getting this error.我正在尝试安装 TensorFlow,但出现此错误。

ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\ryans\\AppData\\Roaming\\Python\\Python39\\site-packages\\tensorflow\\~ompiler\\tf2tensorrt\\_pywrap_py_utils.pyd'
Check the permissions.

I tried to install with this: pip3 install --upgrade tensorflow --user我试着用这个安装: pip3 install --upgrade tensorflow --user

I Googled for a solution.我用谷歌搜索了一个解决方案。 I haven't found anything yet.我还没有找到任何东西。 Has anyone encountered this?有没有人遇到过这个? Better yet, any solutions for this kind of thing?更好的是,这种事情有什么解决方案吗?

If you are installing it, don't use the upgrade flag, try pip install tensorflow instead or pip install tensorflow --user or pip3 install tensorflow or python3 -m pip install tensorflow .如果您正在安装它,请不要使用升级标志,请尝试pip install tensorflowpip install tensorflow --userpip3 install tensorflowpython3 -m pip install tensorflow

Also check if windows defender is blocking the installation.还要检查 windows defender 是否阻止了安装。 You can check the shield icon in the bottom left corner in the notification area.您可以在通知区域的左下角查看盾牌图标。

If you don't give it permission, it will not allow you to modify any system files.如果你不给它权限,它就不允许你修改任何系统文件。

You also need to have permission to read and write files / data in your account.您还需要具有在您的帐户中读取和写入文件/数据的权限。 Please make sure you have administrator rights in your account.请确保您的帐户拥有管理员权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM