Skip to content

Error installing on a Mac #349

Closed
Closed
@SirWellington

Description

@SirWellington

I'm trying to install this so I can use it with atom, but it's not working.

I'm running python 2.7.10 on OSX 10.13.4. I get the following issue:

| => pip install 'python-language-server[all]'
Collecting python-language-server[all]
  Using cached https://files.pythonhosted.org/packages/02/0b/1734eb9762da057606514c018620145cd4e414e79679877db08bfb22cf0e/python-language-server-0.18.0.tar.gz
    Complete output from command python setup.py 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"

Help

Activity

gatesn

gatesn commented on May 10, 2018

@gatesn
Contributor

@SirWellington can you run pip install -U setuptools and try again?

SirWellington

SirWellington commented on May 10, 2018

@SirWellington
Author

I should mention, I'm new to Python…

Per your suggestions, I get this error:

Collecting setuptools
  Using cached https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
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/__init__.py', '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/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/markers.py', '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/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/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/private/var/folders/gt/4t7c08p92zj3_mwnsy869f280000gn/T/pip-uninstall-sQ3oWy/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]
gatesn

gatesn commented on May 10, 2018

@gatesn
Contributor

The default OSX Python forbids you from using pip install unless you pass the --user flag. I suggest instead of doing that, you install python using HomeBrew: http://docs.python-guide.org/en/latest/starting/install3/osx/

SirWellington

SirWellington commented on May 10, 2018

@SirWellington
Author

bitmoji

I appreciate the help. These cryptic messages aren't really beginning-friendly!

gatesn

gatesn commented on May 10, 2018

@gatesn
Contributor

Absolutely agree. Happy to add things to README if it would help

SirWellington

SirWellington commented on May 10, 2018

@SirWellington
Author

I think that would be helpful.

I finally figured it out. I had to install python using brew.

Commands:

# install python
brew install python2
# change the path of the current terminal session
export PATH=/usr/local/share/python:$PATH
# setup the brew-installed pip
pip install -U setuptools
# finally, install pls
pip install 'python-language-server[all]'

That's all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @SirWellington@gatesn

        Issue actions

          Error installing on a Mac · Issue #349 · palantir/python-language-server