Atom / Pip / Python Language Server


Hello I am trying to learn python using atom. As I am writing my first script everything is fine BUT atom is telling me:

Unable to start Python Language server. Make sure to install pals 0.19 or newer by running…
python -m pip install ‘python-language-server[all]’

My environment is:

atom - 1.13.2
python - 2.7.10
Mac OS - Mojave 10.14

When trying this command I am getting the following error:

Tom$ sudo -H python2.7 -m pip install ‘python-language-server[all]’
Collecting python-language-server[all]
Downloading (51kB)
100% |################################| 61kB 1.4MB/s
Complete output from command python egg_info:
error in python-language-server setup command: ‘install_requires’ must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in configparser; python_version<“3.0” at ; python_version<“3.0”


Command “python egg_info” failed with error code 1 in /private/tmp/pip-install-XoKRFw/python-language-server/

Can someone help me clear this error so I can continue? Thank you.


Is there a reason you need sudo for this?

Can someone help me clear this error so I can continue?

If you are still having difficulty installing PyLS after you try it without sudo, you can disable ide-python until you find someone who can help you install the language server on Mac. That will quiet the error.


There is no reason I used sudo just part of trying to make it work on my part. The error is the same with or without sudo.

Hopefully someone can advise how to correct this.


According to the python-language-server docs:

If you get an error similar to ‘install_requires’ must be a string or list of strings then please upgrade setuptools before trying again.

There’s another inconsistency. I don’t know the inner workings of ide-python and don’t have time to investigate now, but I suspect that it likely uses the python command to try to invoke the language server. The command you’re using is for Python 2, specifically. If python points to Python 3, then you should probably install the language server under that command.


Tried adding the version 2.7 to the command with no luck before I posted as that does seem to be the crux of the issue but Atom can’t tell me what needs to be done here. I do appreciate your suggestions.


What happens if you upgrade setuptools?


Thanks for the reply. I checked into the Atom application and in the ‘install packages’ section typing in setuptool does not reveal a package of this name? Are you referring to something else, if so what?

Thank you


If you follow the link I posted and look for the text that I quoted, you will see a command:

pip install -U setuptools

Run this on your system command line to upgrade the setuptools you have installed.


Thank you for the clarification, I ran the command and I don’t think it worked because I got a very long that equally as unclear.

Collecting setuptools

Downloading (569kB)

100% |████████████████████████████████| 573kB 6.7MB/s 

Installing collected packages: setuptools

Found existing installation: setuptools 18.5

Uninstalling setuptools-18.5:

Could not install packages due to an EnvironmentError: [(’/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc’, ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc’, “[Errno 1] Operation not permitted: ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc’”), (’/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/’, ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/’, “[Errno 1] Operation not permitted: ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/’”), (’/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/’, ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/’, “[Errno 1] Operation not permitted: ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/’”), (’/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc’, ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc’, “[Errno 1] Operation not permitted: ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc’”), (’/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib’, ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib’, “[Errno 1] Operation not permitted: ‘/private/var/folders/0s/b4r16hdn0h73qzfp0zp69jgw0000gn/T/pip-uninstall-lLh52d/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib’”)]


I’ve never seen that error before, and based on the error message (it talks about permission and includes a lot of Mac-specific folders like), my best guess is that it’s Mac-related. Sure enough, if I type pip mac operation not permitted into Google, this is the first result. If you use the --user flag to install a package that also exists inside /System/Library/Frameworks/Python.framework/Versions/2.7/, the one in your user folder should take precedence. Here’s some extra reading on how Python locates packages.