Eseguo l'interprete con il comando: ./python Se eseguo semplicemente Python mi fa utilizzare quello di sistema
Inviato da iPhone > Il giorno 08 set 2016, alle ore 17:47, Carlo Miron <mi...@python.it> ha > scritto: > > 2016-09-08 17:39 GMT+02:00 Emanuele Urselli <urselliemanu...@icloud.com>: > >> Piattaforma: Ubuntu 16.04 >> Versione Python: 3.5.2 > > Stessa piattaforma e versione. > >> Posizione modulo: /home/Python-3.5.2 >> Nome file: m.py (modulo: m) >> Contenuto: print(__name__) >> Comando: $ python -m m >> Output: __main__ (nessun .pyc creato) > > miron@hop:/tmp/eu > $ echo "print(__name__)" > m.py > miron@hop:/tmp/eu > $ ls > m.py > miron@hop:/tmp/eu > $ python3 -m m > __main__ > miron@hop:/tmp/eu > $ ls > m.py __pycache__ > > come previsto. > >> Invece: >> Comando: $ python -m m.py >> Output: __main__ (generato bytecode) > > miron@hop:/tmp/eu > $ python3 -m m.py > m > /usr/bin/python3: Error while finding spec for 'm.py' (AttributeError: > module 'm' has no attribute '__path__') > > come previsto. > >> Lo stesso per quanto riguarda l'opzione -O (generazione bytecode ottimizzato) > > Sei sicuro di star utilizzando l'interprete giusto, e non il Python > 2.7.12 di sistema? > > ㎝ > > -- > |:**THE BEER-WARE LICENSE** *(Revision 42)*: > | <mi...@python.it> wrote this mail. As long as you retain > | this notice you can do whatever you want with this stuff. > | If we meet some day, and you think this stuff is worth it, > | you can buy me a beer in return. > | --Carlo Miron : > _______________________________________________ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python