On 03Oct2019 00:45, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
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@localhost:~$ bash -x ~/.pyenv/shims/ipython3
[...]
+ exec /home/werner/.pyenv/libexec/pyenv exec ipython3
Python 3.7.4 (default, Aug 29 2019, 06:59:32)
[...]
In [1]:
-----------------

Also tried the follows:
werner@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@localhost:~$

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

That is because ~/.local/bin/ipython3 is not a shell script (thus syntax errors). It is directly a python script.

Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to