Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to build properly an alias?
    text
    copied!<p>I put one new alias <code>python3.3</code> in my <code>.bash_profile</code> so as to launch easily the <code>python3.3</code> version of <a href="http://www.pyzo.org/" rel="nofollow">pyzo</a>.</p> <p>I can use this alias in a terminal without any problem, but when I use something like <code>subprocess.check_call(args = ["python3.3", onePyFile])</code>, I have the following error.</p> <pre><code>Traceback (most recent call last): ... File "/Library/Frameworks/pyzo2013b/lib/python3.3/subprocess.py", line 540, in check_call retcode = call(*popenargs, **kwargs) File "/Library/Frameworks/pyzo2013b/lib/python3.3/subprocess.py", line 521, in call with Popen(*popenargs, **kwargs) as p: File "/Library/Frameworks/pyzo2013b/lib/python3.3/subprocess.py", line 818, in __init__ restore_signals, start_new_session) File "/Library/Frameworks/pyzo2013b/lib/python3.3/subprocess.py", line 1416, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'python3.3' </code></pre> <p>I guess that my alias is not seen everywhere. So how can I fix my problem ? What is the good way to build my own alias ?</p> <p>If I try <code>subprocess.check_call(args = ["python3.3", onePyFile], shell = True)</code>, I have the following error.</p> <pre><code>onePyFile.py: python3.3: command not found Traceback (most recent call last): File "mainFile.py", line 72, in &lt;module&gt; shell = True File "/Library/Frameworks/pyzo2013b/lib/python3.3/subprocess.py", line 545, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['python3.3', 'onePyFile.py']' returned non-zero exit status 127 </code></pre> <p>If i just use <code>subprocess.check_call(args = ["python3.3", onePyFile])</code> where the first line of <code>onePyFile</code> is <code>#! /usr/bin/env python3.3</code>, I have the following error.</p> <pre><code>env: python3.3: No such file or directory Traceback (most recent call last): ... </code></pre> <p>I think that my problem is more about the symbolic link than the Python call. But I do not know what is wrong. Indeed this is the first time that I make a personal symbolic link with an alias.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload