This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: «python»: Aucun fichier ou dossier de ce type
Type: behavior Stage: resolved
Components: Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Goheakan, sab1703, terry.reedy, veky
Priority: normal Keywords:

Created on 2020-05-12 08:19 by sab1703, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
env sab1703, 2020-05-12 09:46
Messages (14)
msg368706 - (view) Author: Isa (sab1703) Date: 2020-05-12 08:19
OS: X-Ubuntu 20.04 LTS
Python's version: 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] on linux

Since the last update I receive the following message:
/usr/bin/env: «python»: Aucun fichier ou dossier de ce type

Thank you in advance for helping.
msg368707 - (view) Author: Vedran Čačić (veky) * Date: 2020-05-12 08:29
How do you know which version of Python you have if you can't run it? :-)
msg368709 - (view) Author: Isa (sab1703) Date: 2020-05-12 08:38
Good question ;D
I don't know and I don't understand...

When I type the commands to know the version, I receive this:
~$ python3
Python 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

But when I want to use a programm with Python, I receive: /usr/bin/env: «python»: Aucun fichier ou dossier de ce type
msg368711 - (view) Author: Vedran Čačić (veky) * Date: 2020-05-12 09:14
What do you mean by 

> when I want to use a programm with Python

? Do you write something like

~$ python3 myscript.py

? If so, maybe it's myscript.py that's missing, not Python itself.
msg368715 - (view) Author: Isa (sab1703) Date: 2020-05-12 09:46
Sorry. I had to write, "when I open a programm."

And what I can't understand, too is: that file is in usr/bin!!

Is there anything in what can explain that mess?
msg368716 - (view) Author: Isa (sab1703) Date: 2020-05-12 09:50
I understand less and less

$ python3 myscript.py
python3: can't open file 'myscript.py': [Errno 2] No such file or directory
msg368717 - (view) Author: Vedran Čačić (veky) * Date: 2020-05-12 10:00
Of course the _env_ is in /usr/bin. It's _python_ that's not found.

What program are you trying to run? And does it maybe start with

     #!/usr/bin/env python

? If yes, you should change it to python3.
msg368718 - (view) Author: Isa (sab1703) Date: 2020-05-12 10:30
You're right! instead of python3 it's written python only. Thank you!

I can't change them :( because I can't open them properly :(...
Can I change the name of the python's file? or???
msg368719 - (view) Author: Vedran Čačić (veky) * Date: 2020-05-12 10:34
You surely can, but I don't know much about OS X. You can probably set some kind of alias (https://www.peachpit.com/articles/article.aspx?p=31442&seqNum=5).
msg368721 - (view) Author: Isa (sab1703) Date: 2020-05-12 10:59
Thank you for having helped.
I've contacted the support of the programms and had explained how to solve the issue. Now... let's go and see ;)...

Have a nice day!
msg368724 - (view) Author: Isa (sab1703) Date: 2020-05-12 11:33
Their answer is: "Again: setup your environment so that python3 is available as python."

Can you help in that matter cause I can do nothing, please??

The Operatery System is: X-Ubuntu 20.04 lts
https://xubuntu.org/release/20-04/
msg368996 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-05-16 01:30
Titles should be in English (translated if quoting output).  I am closing because there is no indication that there is a bug in Python, as opposed to a misunderstanding of how to use it.

Extended help discussion is better conducted on python-list.  For one thing, discussion there is seen by many more people. 

Isa: traditionally, on *nix, 'python' ran Python2 and 'python3' has been used to run Python3.  Sometimes 'python2' has also been used.  Different Linux distributions distributions disagree about whether and when to make 'python' run Python3.  I believe that you can make this happen for your login, but it might disable other programs, especially things provided by Ubuntu.  So it is probably best if you write a shell script that makes the change temporarily.  Since this is going to be a common problem, please ask a question on python-list.  Suggestion:
---

(Subject) Make 'python' run Python 3.8 on Ubuntu

I want to run a program on Ubuntu 20.04 that expects 'python' to run Python 3 instead of Python 2.  How can I do this without disabling other programs that expect the opposite?
msg369018 - (view) Author: Isa (sab1703) Date: 2020-05-16 07:24
Thank you, Terry J. Reedy
I'll do that eventhough I don't like writing script...

As far as the title is concerned: that is the error message I receive ;)... sorry, my PC speaks french ;D...
msg372162 - (view) Author: Goheakan (Goheakan) Date: 2020-06-23 12:30
Bonjour Isa, Hello Terry !

"/usr/bin/env: «python»: Aucun fichier ou dossier de ce type"
or
"/usr/bin/env: «python»: No such file or directory"


I was in the same trouble of you today and I solved it.
So it's not a bug, some Unix Systems Operating (like Ubuntu and derivetives) need a little help to start the compilation in Python. A sort of link between Python and Python3.


You can do it by installing this package => python-is-python3 by the simple command :
sudo apt install python-is-python3


Now run your program as usual with :
./[your_program]

Isa (sab1703) : Si tu as besoin d'aide en français n'hésite pas ◕‿↼

Hope it's gonna help (^̮^)
History
Date User Action Args
2022-04-11 14:59:30adminsetgithub: 84785
2020-06-23 12:30:31Goheakansetnosy: + Goheakan
messages: + msg372162
2020-05-16 07:24:22sab1703setmessages: + msg369018
2020-05-16 01:30:25terry.reedysettype: crash -> behavior
2020-05-16 01:30:10terry.reedysetstatus: open -> closed

nosy: + terry.reedy
messages: + msg368996

resolution: not a bug
stage: resolved
2020-05-12 11:33:34sab1703setmessages: + msg368724
2020-05-12 10:59:42sab1703setmessages: + msg368721
2020-05-12 10:34:38vekysetmessages: + msg368719
2020-05-12 10:30:37sab1703setmessages: + msg368718
2020-05-12 10:00:26vekysetmessages: + msg368717
2020-05-12 09:50:51sab1703setmessages: + msg368716
2020-05-12 09:46:43sab1703setfiles: + env

messages: + msg368715
2020-05-12 09:14:06vekysetmessages: + msg368711
2020-05-12 08:38:01sab1703setmessages: + msg368709
2020-05-12 08:29:04vekysetnosy: + veky
messages: + msg368707
2020-05-12 08:19:01sab1703create