03 July 2021, 20:48 | #1 |
Registered User
Join Date: Jan 2021
Location: UK
Posts: 53
|
Python v2.4
Hi All,
Following on from JOTD's suggestion, I installed Python 2.4 on my A1200. I followed the instructions in the article from the 'Tech Cowboy' link here ... https://cowboy3398.wordpress.com/202...-2-4-on-amiga/ I managed to compile a simple program, but at the top of the output page I always get "'Import file' failed: use -v for traceback". Now the program does still run fine, but the message is a bit annoying and I'd like to sort it out. From doing a bit of digging online, it seems to be connected with the environment settings ... following the advice in the article my user-startup file had the following added... BEGIN Python; Alias Python Programs:Programming/Python2.4-m68k-amigaos/bin/python2.4 SETENV PYTHONHOME Programs:Programming/Python2.4-m68k-amigaos/lib/Python2.4 SETENV PYTHONPATH $PYTHONHOME 'END Python Is there anyone with an idea of how to fix that error when compiling please? On another note, in general, how do we know what version a particular library file is ... I replaced my existing ixemul.library and ixnet.library files when following the installation article obtaining the replacement ones from Aminet (http://aminet.net/package/util/libs/ixemul-48.0), but interestingly the size of the replacement files were smaller than the ones I had installed already. So I'd like to know which versions my library files are if possible. Does a larger library file size always mean a newer version? Thanks in advance for any help on this. |
03 July 2021, 22:20 | #2 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
I also have installed Python 2.4 with help of "Tech Cowboy's" tutorial and could'nt get rid of that message you refer too.
I noted that, with version 2.4 of python, it allways give an error when try to import modules and I think that is relationated with the message "Import file failed" at initialization. In version 3.3.6 all works fine. |
03 July 2021, 22:31 | #3 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,388
|
run it with -v option and post traceback
|
03 July 2021, 23:01 | #4 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
7.System:> python -v
# installing zipimport hook import zipimport # builtin # installed zipimport hook 'import site' failed; traceback: ImportError: No module named site I didnĀ“t even find any modules folder Last edited by AlfaRomeo; 03 July 2021 at 23:11. |
03 July 2021, 23:37 | #5 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,388
|
seems that you were almost there:
https://stackoverflow.com/questions/...ite-on-windows Code:
SETENV PYTHONHOME Programs:Programming/Python2.4-m68k-amigaos/lib/Python2.4 SETENV PYTHONPATH $PYTHONHOME or create an empty "site.py" file. This only defines default encoding AFAIR... |
03 July 2021, 23:53 | #6 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
Thanks for the help
|
04 July 2021, 10:46 | #7 | |
Registered User
Join Date: Jan 2021
Location: UK
Posts: 53
|
Quote:
Cheers anyway! |
|
04 July 2021, 11:55 | #8 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,311
|
Maybe SnoopDos will help to find where it tries to access the "site" import.
|
04 July 2021, 12:37 | #9 |
Registered User
Join Date: Jan 2021
Location: UK
Posts: 53
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Python for Amiga ? | macce2 | Amiga scene | 118 | 05 December 2021 15:08 |
Python V1.4 | JJ__ | Coders. Language | 5 | 01 July 2021 20:34 |
Python 1 joystick | ladybird | Retrogaming General Discussion | 3 | 08 August 2007 15:06 |
Python Joysticks ? | blade002 | MarketPlace | 11 | 18 June 2006 04:48 |
Monty Python | Bueller | request.Demos | 2 | 12 October 2005 16:39 |
|
|