0

I am trying to upgrade setuptools to ver 18.5 or more so that I can install these libraries: html5lib, lxml, lxml.cssselect, & requests. So I'm attempting to do this by entering:
curl https://bootstrap.pypa.io/ez_setup.py -o - | python in the command line. However, this gives me the following error. I am using Mac OSX..

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12402  100 12402    0     0  49481      0 --:--:-- --:--:-- --:--:-- 49608
Extracting in /var/folders/wt/9y2d_zh12r98sn0416p0yjs00000gn/T/tmpvS6bWN
Now working in /var/folders/wt/9y2d_zh12r98sn0416p0yjs00000gn/T/tmpvS6bWN/setuptools-27.3.0
Installing Setuptools
running install
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: '/Library/Python/2.7/site-packages/test-easy-install-17438.write-test'

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

    /Library/Python/2.7/site-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://setuptools.readthedocs.io/en/latest/easy_install.html

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

Something went wrong during the installation.
See the error message above.

Any help would be appreciated!Thanks

metatoaster
  • 17,419
  • 5
  • 55
  • 66
  • Have you looked into this: [Installing pip on Mac OS X](http://stackoverflow.com/a/29188667/2904896) – metatoaster Sep 22 '16 at 03:13
  • Yes, I did see this before I wrote my question. Thank you. My problem is that I am unable to upgrade the setuptools. – Maaz Mohamedy Sep 22 '16 at 03:56
  • Have you tried it with `curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python` as in the answer that was linked? If you have and problem is still there you should update your question text with the failure in that case. – metatoaster Sep 22 '16 at 04:13
  • Thanks! However, unfortunately this does seem to update setuptools. Even still when I write "sudo pip install html5lib" I get an error saying: "html5lib requires setuptools version 18.5 or above; please upgrade before installing (you have 1.1.6)" – Maaz Mohamedy Sep 22 '16 at 06:25
  • You should look into getting virtualenv as OS X tends to have either old or broken support for development tools at the system level https://virtualenv.pypa.io/en/stable/ – metatoaster Sep 22 '16 at 06:55
  • Thank you so much for your follow up. I installed virtualenv yet unfortunately, it is still not working..I'm really at a loss here. – Maaz Mohamedy Sep 22 '16 at 22:02

0 Answers0