facebookarchive / codemod

Codemod is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occasional intervention. Codemod was developed at Facebook and released as open source.
Apache License 2.0
4.12k stars 197 forks source link

[solved] Installing on Ubuntu [permission problem, use sudo] #72

Closed albacoretuna closed 8 years ago

albacoretuna commented 8 years ago

Hi this tool sounds so useful and I'm trying to install it, I don't speak Python, but usually I manage to install Python utilities on my Ubuntu. But seems like this is not the case. Is there anything needed after running pip install codemod

To get it running in my terminal? I see the codemod folder created with some python files in it, should I add something to path to be able to run it? /home/omid/.local/lib/python2.7/site-packages/codemod

Thank you!

rochacbruno commented 8 years ago

@omidfi you should only do "sudo pip install codemod" in ubuntu and then run "codemod" command. if any issue found please report us.

albacoretuna commented 8 years ago

@rochacbruno thanks! seems like the problem was not using "sudo" I didn't use sudo to install, and it installed with no errors, but after using sudo it showed

The directory '/home/omid/.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.

And after that sudo -H pip install codemod

Was all needed to make it work!

rochacbruno commented 8 years ago

So we should add that info to README maybe