Error running Python at command line

Hello !

I'm running a simple Python script at TCC command line prompt and, it issues this error :

TCC (Sys) DLL not found : python26.dll

Notice that I have python 3.4.4 installed on my PC.

Also, when I run the same script from Windows Explorer it is ok, that is, the ".py" extension is correctly associated with Python.

The problem is only at TCC command line.

Also, should I call the interpreter explicitly , by issuing "py myscript.py" at command prompt, it also runs fine.

The problem is some sort of implicit association of TCC with Python version 26.

Another problem is that I can't run from inside my BTMs the @python function as well.

Again, implicit association of TCC with Python version 26.

Any suggestions ?
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
There is no implicit association of TCC with Python 2.6 (or any other version of Python). TCC will look in your path for multiple versions of Python (from 3.6.x to 2.5) and use the most recent one it can find. In your case (provided you put Python in your PATH), TCC will look for python34.dll.

The error message you're seeing is being returned by Python, not by TCC. I suspect you have a (partial?) Python 2.6 directory in your PATH before your Python 3.4 directory.
 
There is no implicit association of TCC with Python 2.6 (or any other version of Python). TCC will look in your path for multiple versions of Python (from 3.6.x to 2.5) and use the most recent one it can find. In your case (provided you put Python in your PATH), TCC will look for python34.dll.

The error message you're seeing is being returned by Python, not by TCC. I suspect you have a (partial?) Python 2.6 directory in your PATH before your Python 3.4 directory.

I only have Python 3.4.4 installed and also , this is the only one mentioned at my PATH. I had 2.6 indeed but it was uninstalled.

But there are some issues somewhat complicated ( :-( ) :
  • I'm running on Windows XP .
  • I'm still using version 11 !
I know, I know I shouldn't but, there are other technical stuff that I can't migrate right now.

On the other hand, the Python I'm using is from Python.org . I didn't know that I needed Active State Python .... Do I ? If I do, it looks like Active State Python also does not support Windows XP...

I can upgrade TCC to version 16 (or a later one that supports XP as well) but again, Active State wont allow me to run on XP...
 
Jan 18, 2011
13
0
There is no implicit association of TCC with Python 2.6 (or any other version of Python). TCC will look in your path for multiple versions of Python (from 3.6.x to 2.5) and use the most recent one it can find. In your case (provided you put Python in your PATH), TCC will look for python34.dll.

The error message you're seeing is being returned by Python, not by TCC. I suspect you have a (partial?) Python 2.6 directory in your PATH before your Python 3.4 directory.

py and python run fine, @python can't find its dll

I can't even use python regex's, trying to check that box hangs tcmd, requiring a task manager end task.
 

Attachments

  • t.btm
    260 bytes · Views: 105
Jan 18, 2011
13
0
I think the operative word there may be 'almost'. - I put a path statement in the btm and included the >& output to hopefully show that tcmd thinks python37.dll is in the path.

I really don't so much need @python, but having grep as the regex model is not so good.

The regex analyzer does not work with python checked and as I mentioned tcmd hangs when I try to select python as the regex syntax. I have tested this now on another machine, also running python3.7, though still with tcmd22 with exactly the same results.

A bit more info in the attached file this time.
 

Attachments

  • t.btm
    1.5 KB · Views: 106

rconn

Administrator
Staff member
May 14, 2008
12,340
149
There's several things going wrong in your t.btm.

1) The Python developers broke python3.dll in version 3.7.x - it's failing to export one of the functions (PyRun_SimpleString). (This does work in version 3.6.) I've added a workaround for the next build of TCC.

2) Your "%@python["print(*'abcdefhl',sep=' ')"]" line is meaningless - it will evaluate to a string ("a b c d e f h l") which TCC will then attempt to execute as a command (and fail). Did you mean to prefix that with an ECHO?

3) Your "%@python" syntax is wrong - you should not be using double quotes around the @python arguments. It should be something like "%@python[print(*'abcdefhl',sep=' ')]
 
Similar threads
Thread starter Title Forum Replies Date
T Fixed TCC 17: Error running Chocolatey Package Manager Support 3
R No Error Message when running mklink as limited user Support 3
mscheuner Running one tab as Vista admin - ERROR Support 1
J 4NT Error when running 'system' from a program to execute a .BTM Support 3
C Copy (sys) error Support 3
T Error: This page can’t be displayed Make sure the web address //ieframe.dll/dnserrordiagoff.htm# is correct. Support 8
kb6ojs How to? "Specified Account Already Exists" error installing TCMD v27 Support 12
samintz How to? Abort on error DO loop Support 10
mfarah Fixed The DATE command produces the wrong error message. Support 1
vefatica ON ERROR terminates DO loop. Support 0
C Google intregration error Support 4
C FB intregration error Support 0
gworley rd (Remove Directory) gives interesting error: Support 2
D How to? Skip removing directory (RMDIR) without error message Support 2
Dmitry L. Kobyakov Documentation Error in the Help: the WINDOW command Support 0
M Strange error messages from TCC in FTP copy Support 7
vefatica Error message from TOUCH Support 2
R FIND command error Support 9
fpefpe Python dll error Support 3
D error in help documentation? Support 0
R FOR usage error from TCC but not from CMD Support 16
K_Meinhard Help file error Support 1
X small translation error. Support 0
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
Dmitry L. Kobyakov From old version: had the setup's error been corrected? Support 6
vefatica Why no error message? Support 2
vefatica ON ERROR and pipes? Support 8
MickeyF Why does this batch file give me 'unknown command "else"' error? Support 17
Joe Caverly TASKDIALOG Help link error Support 1
J Error "Contents lost before copy" Support 3
vefatica What's causing this error? Support 4
vefatica Error 203? Support 4
C Activation Error. Support 2
Joe Caverly PSHELL Error? Support 16
M Fixed PSHELL command returns error Support 2
vefatica REGDIR, strange error message Support 7
O Error in plugin /u Support 2
O TPIPE: Error -Can´t access textpipeengine.dll Support 24
fpefpe How to? script error Support 1
fpefpe How to? script error Support 0
D Error 0xc0000142 and FAR Manager Support 10
F Powershell call fails with "Scripting Integrator 2016 (PowerShell)" license error Support 9
cgunhouse FTP Error Support 5
C How to? Error updating from 20.00.16 to 20.00.21 Support 10
vefatica Missing post and security error Support 4
samintz Documentation TCANSI error Support 8
vefatica WAD ON ERROR GOTO ... Support 11
dcantor Documentation Documentation error in UNSET Support 0
vefatica Error updating Support 2
C tpipe /simple=28 error Support 5

Similar threads