Author Topic: Problem: Wrong Tcl version while plotting with atkpython (version 11.2.3)  (Read 4145 times)

0 Members and 1 Guest are viewing this topic.

Offline ziand

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: de
  • Reputation: 5
    • View Profile
When I try to plot something manually, by using atkpython 11.2.3  [Build 3085], I get the following (input and output):
Code
Atomistix ToolKit 11.2.3 [Build 3085]

In [1]: import pylab

In [2]: pylab.plot((1,2,3))
---------------------------------------------------------------------------
TclError                                  Traceback (most recent call last)

C:\Dokumente und Einstellungen\ziand\<ipython console> in <module>()

D:\Software\QuantumWise\atk-11.2.3\atkpython\lib\site-packages\matplotlib-0.99.3-py2.6-win32.egg\matplotlib\pyplot.pyc in plot(*args, **kwargs)

D:\Software\QuantumWise\atk-11.2.3\atkpython\lib\site-packages\matplotlib-0.99.3-py2.6-win32.egg\matplotlib\pyplot.pyc in gca(**kwargs)

D:\Software\QuantumWise\atk-11.2.3\atkpython\lib\site-packages\matplotlib-0.99.3-py2.6-win32.egg\matplotlib\pyplot.pyc in gcf()

D:\Software\QuantumWise\atk-11.2.3\atkpython\lib\site-packages\matplotlib-0.99.3-py2.6-win32.egg\matplotlib\pyplot.pyc in figure(num, figsize, dpi, facecolor, edgecolor, frameon, FigureClass, **kwargs)

D:\Software\QuantumWise\atk-11.2.3\atkpython\lib\site-packages\matplotlib-0.99.3-py2.6-win32.egg\matplotlib\backends\backend_tkagg.pyc in new_figure_manager(num, *args, **kwargs)

D:\Software\QuantumWise\atk-11.2.3\atkpython\lib\lib-tk\Tkinter.pyc in __init__(self, screenName, baseName, className, useTk, sync, use)

TclError: Can't find a usable init.tcl in the following directories:
    D:/Software/Python26/lib/tcl8.5 D:/Software/QuantumWise/atk-11.2.3/atkpython/lib/tcl8.5 D:/Software/QuantumWise/atk-11.2.3/lib/tcl8.5 D:/Software/QuantumWise/atk-11.2.3/atkpython/library D:/Software/QuantumWise/atk-11.2.3/library D:/Software/QuantumWise/atk-11.2.3/tcl8.5.2/library D:/Software/QuantumWise/tcl8.5.2/library

D:/Software/QuantumWise/atk-11.2.3/atkpython/lib/tcl8.5/init.tcl: version conflict for package "Tcl": have 8.5.2, need exactly 8.5.8
version conflict for package "Tcl": have 8.5.2, need exactly 8.5.8
    while executing
"package require -exact Tcl 8.5.8"
    (file "D:/Software/QuantumWise/atk-11.2.3/atkpython/lib/tcl8.5/init.tcl" line 20)
    invoked from within
"source D:/Software/QuantumWise/atk-11.2.3/atkpython/lib/tcl8.5/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"


This probably means that Tcl wasn't installed properly.


In [3]:
atkpython-10.8.2 works fine. Any suggestions?

Offline ziand

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: de
  • Reputation: 5
    • View Profile
I have to add, that the problem does appear under Windows XP (32bit), but not under Linux (64bit). I installed the Windows version recently on my desktop notebook. I did not deinstall previous versions because it always went fine.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Since you have another Python with Tcl installed, I'm guessing it has defined some environment variables which ATK picks up and tries to use. As long as ATK is used self-contained, there should be no problems, but in this case somehow the libraries from the two installations get mixed. Check for environment variables like TCL_LIBRARY and/or TK_LIBRARY and make sure they are unset in the ATK sessions.

Offline ziand

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: de
  • Reputation: 5
    • View Profile
Tcl problem solved
« Reply #3 on: July 6, 2011, 14:48 »
I could not find environment variables like the the ones you mentioned. Anyway, I could solve the problem: I have a separate installation of Python and related packages on my computer and within the windows PATH variable there are several entries pointing to this. The ATK-11.2.3 related paths have been appended at the end of the PATH-list. I just moved them in front of the older Python-related stuff. This solved the problem. (And indeed the file init.tcl inside the OLD Python version contains the line "package require -exact Tcl 8.5.2", while in ATK-11.2.3 there is "package require -exact Tcl 8.5.8".)

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5413
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Thanks for documenting the solution for the benefit of the entire community! :)

Indeed, the PATH can be enough sometimes to cause problems; a similar problem is known with Qt libraries installed e.g. with MikTeX, which are incompatible with ATK but picked up first because the ATK binary directories appear later in the path.