Eu quero instalar um bruteforcer que use pip em python, ajude-me com isso!

-1
The directory '/home/anuj/.cache/pip/http' or its parent directory is not 
owned by the current user and the cache has been disabled. 
Please check the permissions and owner of that directory. 
If executing pip with sudo, you may want sudo's -H flag.

Eu recebo este erro ao executar o seguinte script python:

import os
os.system("sudo apt-get install python-pip python-dev build-essential -y")
os.system("sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-setuptools -y")
os.system("pip install -U selenium && sudo apt-get install firefoxdriver -y")
os.system("pip install mechanize && pip install paramiko && pip install requests && pip install xmpppy==0.5.0rc1")
os.system("pip install stem && pip install pyvirtualdisplay && apt-get install xvfb")

Agora eu preciso instalar, por favor me ajude!

    
por Anuj 07.01.2018 / 18:54

1 resposta

1

Retome a propriedade da pasta cache do pip em seu diretório inicial usando este comando:

sudo chown -R anuj: /home/anuj/.cache/pip/

Depois disso, pip deve parar de reclamar.

Para o futuro, nunca execute sudo pip . Se você realmente precisar usar pip para instalar pacotes Python globalmente para todos os usuários, use sudo -H pip , para que ele use o diretório home do usuário root como cache.

    
por Byte Commander 07.01.2018 / 19:10