Forums

pip install 'permission denied' for TwitterFollowBot

Trying to run pip install --user TwitterFollowBot in Bash console but getting the following error.

Any ideas?

Collecting TwitterFollowBot
  Using cached TwitterFollowBot-2.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    fatal: Not a git repository (or any parent up to mount point /tmp)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:

        [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-18734.write-test'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

        /usr/local/lib/python2.7/dist-packages/

    installation directory is a system-owned directory, you may need to sign in
    Perhaps your account does not have write access to this directory?  If the
    installation directory is a system-owned directory, you may need to sign in
    as the administrator or "root" account.  If you do not have administrative
    access to this machine, you may wish to choose a different installation
    directory, preferably one that is listed in your PYTHONPATH environment
    variable.

    For information on other options, you may wish to consult the
    documentation at:

      https://pythonhosted.org/setuptools/easy_install.html

    Please make the appropriate changes for your system and try again.


    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-a0XZ29/TwitterFollowBot 
    22:00 ~ $ pip install --user --upgrade TwitterFollowBot
   Collecting TwitterFollowBot
  Using cached TwitterFollowBot-2.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    fatal: Not a git repository (or any parent up to mount point /tmp)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:

        [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-18850.write-test'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

        /usr/local/lib/python2.7/dist-packages/

    Perhaps your account does not have write access to this directory?  If the
    installation directory is a system-owned directory, you may need to sign in
    as the administrator or "root" account.  If you do not have administrative
    access to this machine, you may wish to choose a different installation
    directory, preferably one that is listed in your PYTHONPATH environment
    variable.

    For information on other options, you may wish to consult the
    documentation at:

      https://pythonhosted.org/setuptools/easy_install.html

    Please make the appropriate changes for your system and try again.


    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EOB_zB/TwitterFollowBot

I tried this first, but still no luck

pip install --upgrade setuptools

That looks like a bug in TwitterFollowBot's setup script; it (or one of its dependencies) is ignoring the --user flag and trying to install itself system-wide :-(