On 02Oct2019 07:37, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
I noticed that the ipython on my Debian box located in the following
locations:
werner@localhost:~$ ls .local/bin/ipython*
.local/bin/ipython .local/bin/ipython3
werner@localhost:~$ ls .pyenv/shims/ipython*
.pyenv/shims/ipython .pyenv/shims/ipython3
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@localhost:~$ diff .pyenv/shims/ipython3 .local/bin/ipython3
1,3c1
< #!/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[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(start_ipython())
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.
Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list