GithubHelp home page GithubHelp logo

Comments (4)

andrewroth avatar andrewroth commented on August 25, 2024

I got further with the latest 2.7 windows release. https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.8-1/rubyinstaller-devkit-2.7.8-1-x64.exe. So somewhere between that version and the latest it broke.

Also python gave more info:

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter as tk
>>> window = tk.Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python310\lib\tkinter\__init__.py", line 2299, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable tk.tcl in the following directories:
    {C:\ActiveTcl\lib\tk8.6} C:/ActiveTcl/lib/tcl8.6/tk8.6 C:/ActiveTcl/lib/tk8.6 C:/lib/tk8.6 C:/lib/tk8.6 C:/lib/tk8.6 C:/library

C:/ActiveTcl/lib/tk8.6/tk.tcl: version conflict for package "Tk": have 8.6.12, need exactly 8.6.13
version conflict for package "Tk": have 8.6.12, need exactly 8.6.13
    while executing
"package require -exact Tk  8.6.13"
    (file "C:/ActiveTcl/lib/tk8.6/tk.tcl" line 14)
    invoked from within
"source C:/ActiveTcl/lib/tk8.6/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"


This probably means that tk wasn't installed properly.

>>> window = tk.Tk()
>>>

So then I modified C:\ActiveTcl\lib\tcl8.6\init.tcl and C:\ActiveTcl\lib\tk8.6\tk.tcl, near the start of those files is package require -exact Tcl 8.6.13 and package require -exact Tk 8.6.13, respectively. So I modified those to be package require -exact Tcl 8.6.12 and package require -exact Tk 8.6.12, and it worked!

So is this an issue with ActiveCtl's install? Did they include maybe 8.6.12 in the dll's or elsewhere in their own package, but then require 8.6.13 in the lib files?

from tk.

jeremyevans avatar jeremyevans commented on August 25, 2024

Not sure what the problem is, but I suspect you are correct this is an issue with ActiveTcl and not ruby-tk. Unfortunately, I don't have any experience using ruby-tk on Windows.

from tk.

andrewroth avatar andrewroth commented on August 25, 2024

Yeah, looks like it. Ok, I guess we can close this, but maybe it'll help someone if they have the same problem.

from tk.

AndyObtiva avatar AndyObtiva commented on August 25, 2024

@andrewroth I just wanted to note that the Glimmer DSL for Tk project, which runs on top of Ruby Tk and ActiveTcl, includes detailed Windows setup instructions for how to get ActiveTcl and Ruby Tk installed and working: https://github.com/AndyObtiva/glimmer-dsl-tk?tab=readme-ov-file#pre-requisites

That might help.

from tk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.