[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing $PATH in eshell, in a bash-like behaviour
From: |
Andrea Crotti |
Subject: |
Re: Changing $PATH in eshell, in a bash-like behaviour |
Date: |
Fri, 13 Aug 2010 11:31:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) |
Gabriele Lanaro <gabriele.lanaro@gmail.com> writes:
> I'm trying to add an additional directory to PATH, in order to use python
> virtual environments (virtualenv).
>
> A virtual environment is a directory that contains different version of
> various programs/script in its bin directory.
>
> --- virtualenv hello ---
> hello/
> - hello/bin
> python
> pip
> easy_install
> ...
> - hello/lib/
> ---
>
> The problem here is tat if I add the directory /abs/path/to/hello/bin as
> the first element of PATH (using getenv/setenv), eshell modifies correctly
> the variable but doesn't prefer the commands defined in hello/bin, for
> example:
>
> eshell> which python
> /usr/bin/python
> eshell> # path modification
> eshell> echo $PATH # or getenv PATH
> /abs/path/to/hello/bin:/bin:/usr/bin:...
> eshell> which python
> /usr/bin/python
>
> If i launch the command in another way, using for example shell-command..
>
> M-! which python
> /abs/path/to/hello/bin/python
>
> So it works in the correct way.
>
> How to make eshell behaving the same way, are there any workaround I can
> do?
For python you should instead set the py-python-command, see this
article [fn:1]
For your problem maybe eshell doesn't read that variable at run time?
*-*-*-*-*-*-*-*-*-*
[fn:1]
http://jesselegg.com/archives/2010/03/14/emacs-python-programmers-2-virtualenv-ipython-daemon-mode/