I'm trying to run some code with python. It is using tweepy library. Then, I got this error:
Traceback (most recent call last):
File "script.py", line 1, in <module>
import tweepy
ImportError: No module named 'tweepy'
So, I tried to install dependency:
pip install tweepy
And it get permission denied:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/sockshandler.py'
Consider using the `--user` option or check the permissions.
Next thing to do is to run using sudo. I had a bad experience by using sudo for docker, because it creates protected files all over my local. But I finally tried it anyway sudo pip install tweepy
It returns success, but I still get the same error when I tried to run python3 myscript.py
But, I see some warning to upgrade the pip, so I think maybe that's it. I tried to upgrade pip using both pip install --upgrade pip and sudo pip install --upgrade pip
Still not working.. I tried one last trick up my sleeve. Change the terminal. I think, "maybe after installing, some environment variable not running on this terminal"
Nope. Not working. I admit it should be a newbie question. Having tried some solution on the web, but still not working. Thanks.