-1

this is what iam getting when i install anything :/

should i uninstall pip and install it in 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'
jaabir
  • 45
  • 5
  • it says `Permission denied`. Try running pip as admin. – PhillipD Mar 30 '20 at 12:54
  • ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow – jaabir Mar 30 '20 at 13:07
  • 2
    Note from the TF [website](https://www.tensorflow.org/install) that only 3.5-3.7 are officially tested and also only in 64 bit. You have python 3.8 32 bit. I suggest to just install 3.7 64 bit python – FlyingTeller Mar 30 '20 at 13:16
  • @MuhammedJaabir also don't use the comment function to add additional info or ask seperate questions. Instead hit the `edit` button under your question and edit your question accordingly – FlyingTeller Mar 30 '20 at 13:17
  • ok if thats the case for tf then what for other packages? – jaabir Mar 30 '20 at 13:25
  • What do you mean? In general you need to open `cmd` as administrator when `pip install` ing packages – FlyingTeller Mar 30 '20 at 13:38
  • or can i move the python38-36 to (users\my name) from (program file x86\) – jaabir Mar 30 '20 at 13:44
  • No, you need to uninstall python and then install again, selecting "only for this user" during the install process – FlyingTeller Mar 30 '20 at 13:51
  • https://stackoverflow.com/search?q=%5Bpip%5D+Errno+13+Permission+denied – phd Mar 30 '20 at 18:44

1 Answers1

0

My guess is that since you installed python in "program files", a directory that requires admin permissions when writing, you can't install packages there without pip "running as administrator".

Possible solution - try running it from a shell opened using winkey+x -> Windows Powershell (Admin) or winkey+r -> write "cmd" -> ctrl+shift+enter. The title of the console in both cases should contain the word "Administrator", and you might get a prompt of "do you want to allow this app..." when opening it.

NadavS
  • 738
  • 3
  • 12
  • i dont need to change the dir to program files/python38/lib/site-packages in administrator – jaabir Mar 30 '20 at 13:04
  • If I understand the question correctly, the answer is no. Just open `cmd` as administrator and write `pip install tensorflow`. – NadavS Mar 30 '20 at 13:06
  • ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow – jaabir Mar 30 '20 at 13:08
  • This is a different issue. You have to compile python packages yourself, or have someone compile it for you. My guess is that nobody compiled tensorflow for python 3.8 yet (which you're using), which is unlucky. It might work to download the 3.7 version manually from pypi.org and use `pip install` on the file directly. – NadavS Mar 30 '20 at 13:12
  • https://pypi.org/project/tensorflow/#files – NadavS Mar 30 '20 at 13:13
  • ok now what will i do to download other packages like for eg : pip install – jaabir Mar 30 '20 at 13:24