Python interpreter setup voor elpy emacs

Pagina: 1
Acties:

Vraag


Acties:
  • 0 Henk 'm!

  • Swedgin
  • Registratie: Februari 2016
  • Laatst online: 12-01-2022
Hallo

Sinds kort ben ik Emacs beginnen gebruiken. Ik ben er een report in Latex aan het schrijven en het bevalt me zeer. Ik ben nu aan het kijken om alsook python te beginnen gebruiken in Emacs. Ik heb de package elpy geinstalleerd en in mijn init.el file toegevoegd.
(enable-elpy)
Hiermee werkt Python2 en ik kan rope, yadf, jedi installeren. Maar ik werk met Python3, dus ik voeg dit toe aan mijn init.el file.
(setq python-shell-interpreter "/usr/bin/python3")
(setq elpy-rpc-python-command "python3")
Elpy-config is nu dit:
Elpy Configuration

Virtualenv........: None
RPC Python........: 3.5.2 (/usr/bin/python3)
Interactive Python: /usr/bin/python3 (/usr/bin/python3)
Emacs.............: 26.1
Elpy..............: 1.23.0
Jedi..............: Not found (0.12.1 available)
Rope..............: Not found (0.11.0 available)
Autopep8..........: Not found (1.3.5 available)
Yapf..............: Not found (0.22.0 available)
Black.............: Not found (18.6b4 available)
Syntax checker....: flake8 (/home/speklap/.local/bin/flake8)

You have not activated a virtual env. While Elpy supports this, it is
often a good idea to work inside a virtual env. You can use M-x
pyvenv-activate or M-x pyvenv-workon to activate a virtual env.

The jedi package is not available. Completion and code navigation will
not work.

[run] easy_install --user jedi

The autopep8 package is not available. Commands using this will not
work.

[run] easy_install --user autopep8

The yapf package is not available. Commands using this will not work.

[run] easy_install --user yapf

The black package is not available. Commands using this will not work.

[run] easy_install --user black
De interpreter werkt, maar ik kan die packages niet installeren. Maar werken met Python is ook werken met virtual environments. Ik heb een bestaand virtual env die ik wil activeren. Ik doe dit met "M-x pyvenv-activate". Mijn elpy config is nu:
Elpy Configuration

Virtualenv........: (/home/speklap/Projects/InProgress/Arduino_EMG/venv_Arduino_EMG/bin/)
RPC Python........: 3.5.2 (/usr/bin/python3)
Interactive Python: /usr/bin/python3 (/usr/bin/python3)
Emacs.............: 26.1
Elpy..............: 1.23.0
Jedi..............: Not found (0.12.1 available)
Rope..............: Not found (0.11.0 available)
Autopep8..........: Not found (1.3.5 available)
Yapf..............: Not found (0.22.0 available)
Black.............: Not found (18.6b4 available)
Syntax checker....: flake8 (/home/speklap/.local/bin/flake8)

The python interactive interpreter (/usr/bin/python3) is not installed
on the current virtualenv
(/home/speklap/Projects/InProgress/Arduino_EMG/venv_Arduino_EMG/bin/). The
system binary (/usr/bin/python3) will be used instead.

[run] easy_install /usr/bin/python3

The jedi package is not available. Completion and code navigation will
not work.

[run] easy_install jedi

The autopep8 package is not available. Commands using this will not
work.

[run] easy_install autopep8

The yapf package is not available. Commands using this will not work.

[run] easy_install yapf

The black package is not available. Commands using this will not work.

[run] easy_install black
Ik weet niet echt wat het betekend, wat ik ervan uit maak is dat mijn virtual env geen interpreter heeft? Maar ik kan deze wel activeren en uitvoeren via de terminal. Alsook de geïnstalleerde packages zoals numpy komen niet te voorschijn.

Wat doe ik verkeerd? Ik denk iets met die 2 extra lijnen in mijn init.el. Ik ben wat terughoudend om zaken te installeren op mijn systemwide python.

Ik gebruik ubuntu 16.04.

Alle reacties


Acties:
  • 0 Henk 'm!

  • Swedgin
  • Registratie: Februari 2016
  • Laatst online: 12-01-2022
8)7 Bij het selecteren van de virtual env zat ik een directory te diep, ik had namelijk de bin folder geselecteerd. Het werkt nu