这是我在安装任何东西时得到的东西:/
我应该卸载pip并将其安装在users \ my_name \吗?
C:\Users\Muhammed Jaabir>pip install tensorflow
ERROR: Exception:
Traceback (most recent call last):
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 253, in run
options.use_user_site = decide_user_install(
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 604, in decide_user_install
if site_packages_writable(root=root_path, isolated=isolated_mode):
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 548, in site_packages_writable
return all(
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 549, in <genexpr>
test_writable_dir(d) for d in set(get_lib_location_guesses(**kwargs))
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\utils\filesystem.py", line 140, in test_writable_dir
return _test_writable_dir_win(path)
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\utils\filesystem.py", line 153, in _test_writable_dir_win
fd = os.open(file, os.O_RDWR | os.O_CREAT | os.O_EXCL)
PermissionError: [Errno 13] Permission denied: 'c:\\program files (x86)\\python38-32\\Lib\\site-packages\\accesstest_deleteme_fishfingers_custard_aaoyil'
答案 0 :(得分:0)
我的猜测是,由于在“程序文件”中安装了python,该目录在编写时需要管理员权限,因此如果没有pip“以管理员身份运行”,就无法在其中安装软件包。
可能的解决方案-尝试从使用winkey+x -> Windows Powershell (Admin)
或winkey+r
打开的shell中运行它->写入“ cmd”-> ctrl+shift+enter
。在这两种情况下,控制台的标题都应包含“ Administrator”一词,并且在打开它时可能会提示“您是否要允许该应用程序...”。