elpy with Winpython: how to configure? - emacs

I'm trying to setup elpy for emacs on my windows system, on which I'm using Winpython 3.4.3.
I have installed all the dependencies such as rope, flake8, etc... using pip. When I type M-x elpy-config in emacs, I get "Neither easy_install nor pip found".
If I run (executable-find "python") then I get the correct path to my Winpython installation.
What might be the problem?

On Windows 7 with Emacs 24.5 and Python 2.7 it worked for me to include the actual directory containing pip (Scripts) in the exec-path; using M-x customize-variable exec-path. Apparently, including just the directory of the python executable was not enough.

Related

How can I make auto-complete work with ELPY in emacs?

I am trying to configure my emacs for python programming. Elpy auto-complete suggestion is not working at all in all instances. Any suggestions?
Here is my elpy-config...
Elpy Configuration
Emacs.............: 26.3
Elpy..............: 1.31.0
Virtualenv........: None
Interactive Python: python 3.7.4 (/Users/mdmorshed/.pyenv/shims/python)
RPC virtualenv....: rpc-venv (/Users/mdmorshed/.emacs.d/elpy/rpc-venv)
Python...........: python 3.7.4 (/Users/mdmorshed/.emacs.d/elpy/rpc-venv/bin/python)
Jedi.............: 0.15.1
Rope.............: 0.14.0
Autopep8.........: 1.4.4
Yapf.............: 0.28.0
Black............: 19.3b0
Syntax checker....: flake8 (/usr/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 directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables
in that directory, so Emacs won't find them. If you are missing some
commands, do add this directory to your PATH -- and then do
`elpy-rpc-restart'.
Elpy is suppose to provide auto-completion out-of-the-box. As your elpy-config seems fine, I would suggest reporting the issue in Elpy repository here.

Emacs: where is better have the executable file?

After many changes on my Debian Jessie, when I launch the command emacs I receive an error libgnutls.so.26 : cannot open shared object file: No such file or directory.
If I launch instead the command emacs24 everything is allright.
I have emacs in /usr/local/bin
I have emacs24 in /usr/bin.
So, for now I created an alias to launch emacs24 as emacs, but i don't like and, for example, i have to change the git setting to open the default ide cause emacs is not availlable yet.
The question is where is the correct position of the command ? I have to change my PATH ?
Consider that libgnutls.so.26 is not installable from apt.
Thanks for any suggest or advice.
This is very strange, because a simple sudo dnf install emacs should suffice (I use fedora, so you probably use apt-get instead of dnf). Maybe it is best to just reinstall emacs (backup your .emacs to be safe) using apt-get? Anyhow, in fedora the emacs executable is located at /usr/bin/emacs (which is also the one used in the terminal when you use the emacs command).

Can't make emacs to load the correct virtualenv

I wan't to compile python project in emacs. This project is running in a virtualenvwrapper environment. So i found a emacs plugin called virtualenvwrapper and use M-x work-on to choose virtualenv. After i have done this, the python interpreter and shell has been set to the correct python env, but when i compile emacs with M-x compile, it still can't found all the packages installed in python env.
I found this issue may be caused by zsh. After i change the default shell to bash in terminal. virtualenv works fine. Is it a bug of zsh or i haven't configured zsh with the right way.

Clear steps to install pymacs with emacs 24?

I want autocompletion and refactoring in emacs with python.
I gather that I need rope to do this. To do this with emacs, I need ropemacs. Ropmacs depends on pymacs.
Pymacs is hard to install...or at least the instructions are not clear to me.
Do I need to do two things? Install pymacs and then install a file that tells emacs to talk to pymacs? I've already installed rope and ropemacs super easily, with
pip install rope ropemacs
Here's what I did:
pip install -e "git+https://github.com/pinard/Pymacs.git#egg=Pymacs"
This installs ok on mac os x mountain lion according to PIP.
But I have a feeling that I am not done--or am I?
How do I test to see if pymacs and rope and ropemacs are all working?
I think the easiest way to install ropemacs is to use el-get: M-x el-get-install ropemacs. It installs and build Pymacs, rope and ropemacs. I know that it works on Linux. See the el-get document for more information. (disclaimer: I wrote the installation recipe for el-get so obviously I am biased to my solution)
The difference from the solution using pip is that it setups the Emacs side of Pymacs correctly.
Installation section of Pymacs manual is fairly straightforward — don't be afraid to refer to it if unsure. Below are the steps to install Pymacs in Emacs 24. First, in shell, run:
sudo pip install rope ropemacs
After that in Emacs install Elisp side of Pymacs by adding Marmalade repository and then running package-install pymacs. As of February 2014 you can't install Pymacs via pip, therefore:
git clone http://github.com/pinard/pymacs
cd pymacs
make check
sudo make install
make check ensures the prerequisites. sudo make install puts Pymacs module in Python local modules path, usually /usr/local/lib/python2.7/dist-packages/. People generally frown upon make install, because if you lose the Makefile, it can become hard to cleanly uninstall. But you shouldn't fear it, as pip uses the same directory, so pip uninstall pymacs will work.
In ~/.emacs.d/init.el put:
;; Pymacs
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
(autoload 'pymacs-autoload "pymacs")
Evaluate this with eval-region and try running Python expressions with pymacs-eval. You're good to go.
clone pymacs github, go to folder and proceed tutorial from author. http://pymacs.progiciels-bpi.ca/pymacs.html is now offline, if still so see tutorial at https://web.archive.org/web/20130627154513/http://pymacs.progiciels-bpi.ca/pymacs.html . Look at chapter "2.4) Install the Pymacs proper" and "2.5 Prepare your .emacs file". Chapters are small, have testing and recomendations for windows user.

gdb within emacs on Windows

I'm running Emacs 22.3 in Windows. Earlier today I had gdb working within Emacs just fine. I was installing QT4 and during the installation it asked me to uninstall MSYS which I quickly clicked through not thinking about things. I think I had gdb installed with the MSYS package and Emacs was using that, but I'm not completely sure. Now when I run the following I get an error in the mini-buffer.
M-x gdb
"Searching for program: no such file or directory, gdb"
I tried to add the path "C:\cygwin\bin" to the Emacs load-path with this code but I still get the same error.
(message "Adding cygwin/bin to load path.")
(add-to-list 'load-path "c:/cygwin/bin")
Could someone tell me what I'm doing wrong?
Thanks.
probably adjust your system path to point it where you have gdb installed.
Try using /cygdrv/c/cygwin/bin