4

I am new here. I am trying to setup the python IDE on Atom following the instruction offered by Atom.io.

https://atom.io/packages/ide-python

There is an instruction:

"Depending on your Python setup pyls may be installed in a non default folder. In this case either add the directory to your PATH or edit the "Python Language Server Path" setting of ide-python to point to the pyls executable."

I stucked here. What does it mean? How to add this to the PATH?

Jean-Francois T.
  • 11,549
  • 7
  • 68
  • 107
Xiao Xiao
  • 41
  • 1
  • 2

2 Answers2

2

In my case it was failing because pyls didn't work with Python 2.7 Error

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"

So I installed Python 3.6 and followed you note forcing 3.6

python3.6 -m pip install python-language-server[all]

That did the trick. Thanks!

0

I had the same problem. My solution:

  1. Run from terminal to install pyls:

pip install 'python-language-server[all]'

  1. Print out details of WHERE the python language server was installed:

pip show python-language-server

Which gave me the path:

Location: /home/bad/.local/lib/python2.7/site-packages

I browsed to that path and found the 'pyls' folder. Then I went into atom and edited the configuration to point at '/home/bad/.local/lib/python2.7/site-packages/pyls'. Specifically, if I go into EDIT>CONFIG in the Atom menu I have this:

"*": "atom-ide-ui": use: {} core: telemetryConsent: "no" "exception-reporting": userId: "30865088-5ba0-4a4b-bfd9-04fa28903321" "ide-python": pylsPath: "/home/bad/.local/lib/python2.7/site-packages/pyls"

I suppose you could also add the pyls folder to path, once you find the path, following these instructions: Adding a directory to PATH in Ubuntu

Timothy John Laird
  • 1,101
  • 2
  • 13
  • 24