I created a virtual environment that I can activate used a command line from Terminal (Ubuntu):
source/bin activate
I did what follows to achieve the same on emacs:
M-! then source/bin activate
then RET
But then I guess the virtual environment is not activated and I am getting this error message:
/bin/bash: source/bin: No such file or directory
What am I missing?
EDIT 1:
It seems I have to use a package like auto-virtualenv
; and for that I have to tell Emacs to use the MELPA repository. So following the documentation.
I restarted Emacs but still can not install that package with it (M-! package-install
RET auto-virtualenv
RET )
EDIT 2:
Installing the virtual environment auto-virtualenv
is done thanks to wvxvw's comment below. So I am supposed to get rid of the error I mentioned above, but no, it is still there.
EDIT 3:
When I run M-! then pwd
I get this:
/home/h4ck3r/development/app
Then I type M-! and source/bin activate
, I get this error message:
/bash: source/bin: No such file or directory
source/bin
, activating virtual environment like this won't have the desired effect, there's a package for that, and the command isM-x pyvenv-activate
iirc. I think, these days it is packaged with Elpy: github.com/jorgenschaefer/elpy – wvxvw Mar 28 '18 at 6:41.emacs
file to use MELPA packages as described here – Billal Begueradj Mar 28 '18 at 6:44pyvenv.el
, as for your setup: it looks standard. Can you try insteadM-x list-packages
, then find the package you want to install, then pressi
on it, thenx
? – wvxvw Mar 28 '18 at 8:24source/bin activate
– Billal Begueradj Mar 28 '18 at 11:14M-! pwd
to see what bash sees as its current directory, that will probably explain why it cannot findsource/bin
. – wvxvw Mar 28 '18 at 11:40