Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Pip Attribute Error (FIX)

So today I ran into the following issue on my personal machine, Kali. I thought it may help if I share how I fixed it.

After issuing any command in pip I would receive the following:

AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

Figuring that SSL was an issue I googled a bit using that error above and came across the following 

https://github.com/andresriancho/w3af/issues/14895

Mind you I had not tried to install w3af but every bit of information helps. Which now got me to the following:

https://www.linkedin.com/pulse/solution-...nit-karnad

(Now I do have Empire installed but never had this issue as I had installed it a few weeks ago with no issues)

After a bit of poking about in python2.7 I found OpenSSL folder either way I went ahead and issued

yes | /bin/cp -rf /usr/lib/python2.7/dist-packages/OpenSSL/* /root/OpenSSL

It's always good to have a backup just in case. And instead of me responding with a "yes" affirming I went ahead and gave that command by using the "yes | " to the cp command.

After that I went ahead and issued

root@vader:~# rm -rf /usr/local/lib/python2.7/dist-packages/OpenSSL/

As per the guide I was following

root@vader:~# apt-get install --reinstall python-openssl

So now to test if pip works

root@vader:~# pip

Usage:   
  pip <command> [options]


With a little bit of google I was able to fix my issue, and have learned what to do if I see this issue again. I find that it is important to take it upon myself and try, just try. It's okay to be wrong, and it's okay to fail even as long as I learn from it and fix it. I hope that if someone runs into this issue maybe this will help them although Empire may not be included in Kali it is a good tool and can make short work of getting a domain.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Kali] by C00lGuy69Jul 4, 2019 09:32 AM 2 445 Jul 4, 2019 09:32 AM
Last Post: LoSt_KoRn
by pwntokenDec 1, 2017 07:04 AM 13 938 Dec 1, 2017 07:04 AM
Last Post: szrusko
by cameronpJul 1, 2013 07:40 AM 6 164 Jul 1, 2013 07:40 AM
Last Post: cameronp