ipython in different loctions.

Hongyi Zhao hongyi.zhao at gmail.com
Wed Oct 2 20:45:24 EDT 2019


On Thu, 03 Oct 2019 10:19:23 +1000, Cameron Simpson wrote:

>   bash -x ~/.pyenv/shims/ipython3
> 
> and see what its final command does.

Tried as follows:

-----------------
werner at localhost:~$ bash -x ~/.pyenv/shims/ipython3
+ set -e
+ '[' -n '' ']'
+ program=ipython3
+ [[ ipython3 = \p\y\t\h\o\n* ]]
+ export PYENV_ROOT=/home/werner/.pyenv
+ PYENV_ROOT=/home/werner/.pyenv
+ exec /home/werner/.pyenv/libexec/pyenv exec ipython3
Python 3.7.4 (default, Aug 29 2019, 06:59:32) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.8.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: 
-----------------

Also tried the follows:

werner at localhost:~$ bash -x ~/.local/bin/ipython3
+ import re
+ import sys
+ from IPython import start_ipython
from: can't read /var/mail/IPython
/home/werner/.local/bin/ipython3: line 10: syntax error near unexpected 
token `('
/home/werner/.local/bin/ipython3: line 10: `    sys.argv[0] = re.sub(r'(-
script\.pyw?|\.exe)?$', '', sys.argv[0])'
werner at localhost:~$ 


The former can start the ipython, while the latter will fail.





More information about the Python-list mailing list