ipython in different loctions.
On 02Oct2019 07:37, Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
>I noticed that the ipython on my Debian box located in the following
>werner at localhost:~$ ls .local/bin/ipython*
>werner at localhost:~$ ls .pyenv/shims/ipython*
I would guess that the former came from "pip install ipython" and that
the latter came from an an environment set up with pyenv.
>And, they are different:
>werner at localhost:~$ diff .pyenv/shims/ipython3 .local/bin/ipython3
>< #!/usr/bin/env bash
This is a small shell script wrapper, presumably hooking into your pyenv
setup to find the "real" ipython.
>> from IPython import start_ipython
>> if __name__ == '__main__':
>> sys.argv = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv)
This is the Python boilerplate wrapper with pip uses to install an
ipython executable script in a bin directory.
You may find that the shell script from .pyenv/shims eventually executes
a python script like the one from .local/bin. Try going:
bash -x ~/.pyenv/shims/ipython3
and see what its final command does.
Cameron Simpson <cs at cskk.id.au>