TagUI: /usr/bin/env: ‘python’: No such file or directory - update scripts to python3
O/S specifications:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
uname -a
Linux dn00 5.3.0-46-generic #38-Ubuntu SMP Fri Mar 27 17:37:05 UTC 2020 \
x86_64 x86_64 x86_64 GNU/Linux
python --version
Python 3.7.5
php --version
PHP 7.3.11-0ubuntu0.19.10.4 (cli) (built: Apr 8 2020 18:58:29) ( NTS )
Instructions for installation:
https://tagui.readthedocs.io/en/latest/setup.html
ls /usr/local/bin/ | grep tag
tagui
tagui /home/qih/tagui/flows/samples/1_google.tag
PHP Warning: file_get_contents(tagui_chrome.in): failed to open stream: No such file or directory in /home/qih/tagui/src/tagui_chrome.php on line 34
/usr/bin/env: ‘python’: No such file or directory
On execution of the above 'tagui command, the Chrome Browser briefly renders an instance of the UI then crashes, with no further error message at STDOUT.
I ‘rm -rf’ the ~/tagui and redid the process exactly same, with the same result.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (13 by maintainers)
Personally, if a newb to GNU/Linux was doing this, perhaps it might be better to be able to modify the TagUI codebase depending on Python ver 2 /3,rather than editing a system wide ENV like ‘Python’.
I’ll hack up a BASH/DASH script that will detect the OS.Python.ver and modify those Shebang strings. Might take a few days 😎
@kensoh @pp082 @ghost It really helps me a lot!! Because in the later version of OS(It is macOS 13.3.1 (a) now), I find it hard to create a symbolic link for python from python3 after the upgrade of the system protection(the SIP and when trying to edit the permission of root file another error occurs like: “/data: Read-only file system”) and I suffer it for a whole day!!! THANKS!!
@ghost, @kensoh
Thank you very much I had the same problem with my Mac M1 pro.
Python 3.9 is preinstalled. Making the change from
python
topython3
solved it.Search Tagui codebase
Remediate
In all 3 files, modify
From: #!/usr/bin/env python To: #!/usr/bin/env python3
Follow up to Issue: /usr/bin/env: ‘python’: No such file or directory.
Drastic Actions:
Install TagUI
tagui.readthedocs.io/en/latest/setup.html
Install Curl
Results:
PHP
Python3
Execute TagUI
Reoccurence of original issue:
Modify ~/tagui/src/tagui
Execute TagUI
Logic dictates that there must be other references to ‘python’ within the codebase that are getting called and causing this error, therefore must find these instances.
Search Tagui codebase
Remediate
In all 3 files, modify
From:
#!/usr/bin/env python
To:#!/usr/bin/env python3
Summary:
If your GNU/Linux system uses Python 3, you must modify all instances of ‘python’ to ‘python3’, after that, it works as per design.