Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of installation instructions #33

Closed
houmie opened this issue Oct 22, 2017 · 5 comments
Closed

Lack of installation instructions #33

houmie opened this issue Oct 22, 2017 · 5 comments

Comments

@houmie
Copy link

houmie commented Oct 22, 2017

Hi,

I'm very excited about an IDE-Python support for Atom IDE. But I don't understand how this is supposed to work. Your instructions aren't clear enough.

After installing atom-ide-ui I am not sure how to proceed.

pip install python-language-server

Makes little sense to me, as it installs it to a virtualenv. But the Atom IDE still isn't integrated with the IDE-Python, is it?

@exploide
Copy link

exploide commented Oct 23, 2017

You need to install atom-ide-ui first, such that various ide-xxx packages, which act as language-server clients, have a common interface to expose stuff to the UI.

ide-python, one of the language-server clients, does not bundle the implementation of the python-language-server yet. Therefore, you need to install it manually and make it available for ide-python. You can do this with pip or pip3 (depending on your Python version) as stated in the README. But where this will install depends on the exact situation for pip.

  • sudo pip(3) install python-language-server will install it system wide. This should work for you, but may clutter your system (assuming you use Linux here...)
  • pip(3) install python-language-server from within a virtualenv will install it there. You would need to do it in all your virtualenvs. You also need to start atom from within your virtualenv, so it is aware of the environment variables and can find pyls.
  • pip(3) install --user python-language-server will install it in your user directory (don't know how this behaves on Windows). This should work, as it does for me.

Furthermore, if the pyls executable cannot be found, for whatever reason, it is possible to specify the absolute path in the settings of ide-python.

Beside this, since python-language-server is installed manually, you need to update it occasionally, to make advantage of new features and bug fixes. pip(3) install -U python-language-server should do the trick.

An automatic installation and update procedure built into ide-python would simplify the process... #6

@houmie
Copy link
Author

houmie commented Oct 23, 2017

@exploide Thank you for your detailed explanation.

I'm using Mac, so I followed your instructions and have an active virtualenv with python-language-server installed. Within the same command line, I have started Atom.

also pyls can be seen:

(atom-env) Macbook-Pro:~ houmie$ pyls -v
2017-10-23 18:23:35,209 UTC - INFO - pyls.language_server - Starting PythonLanguageServer IO language server

But I still don't grap it. Atom still behaves like a text editor. It doesn't behave like an IDE as in PyCharm. e.g. I can't jump to definitions. I still think I'm missing here something.

@exploide
Copy link

exploide commented Oct 23, 2017

The following steps work for me (on a Linux machine):

mkdir test
cd test
virtualenv -p python3 venv
source venv/bin/activate
pip install python-language-server
atom .

Now I have a virtualenv aware atom. Sounds like what you did.

If I create a new python file, ide functionality like autocompletion or diagnostics (maybe you need to toggle the latter using the icon in the lower left corner) is present.
bildschirmfoto vom 2017-10-23 17-01-00

Are you sure you have Atom >= 1.21, atom-ide-ui and ide-python installed? Otherwise I have no further idea. Maybe something with the overall setup, but I don't know how Mac behaves.

@houmie
Copy link
Author

houmie commented Oct 23, 2017

Thank you for that. It works now!!! I didn't see the wood for the trees as I forgot to install ide-python over the install packages. I thought all it takes to install the ide-python was to pip install the python language server.

Maybe it makes sense to add this to the Readme.

  1. Install Atom
virtualenv -p python3 venv
source venv/bin/activate
pip install python-language-server
atom .
  1. Preferences --> Install --> atom-ide-ui
  2. Preferences --> Install --> ide-python

Many Thanks,

@houmie houmie closed this as completed Oct 23, 2017
@sharkweek
Copy link

sharkweek commented May 18, 2018

I seem to be having the same issue, but I don't think I have Atom set up to aware of virtual environments. I have gone through and reinstalled pyls, atom-ide-ui', and 'atom-ide-debugger-python and ensured that I have proper references to pyls.exe.

I tried this on my desktop, and it seemed to work, but my laptop just keeps the little "waiting" circle up in the 'Outline' window. Am I missing something?

I'm running on two Windows 10 machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants