Comments (4)
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.
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.
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.
@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)
- positionWindow(w) HOT 1
- Unknown command tk HOT 2
- i can't install tk HOT 3
- autoload.rb:455: warning: deprecated Object#=~ is called on Class; it always returns nil HOT 3
- How i can install Tk !? HOT 1
- Can't install tk, something about tcltklib HOT 2
- tk decreases load speed of others gems loading after it HOT 11
- Small warnings issued by the tk gem - could these be removed by someone with commit access? HOT 2
- Ruby crashes during `require 'tk'` on macOS 10.14.6 (Mojave) HOT 11
- Support for Tcl/Tk 8.7 HOT 8
- How to track text widget insert mark change? HOT 1
- Binding standard widget events does not work on text widget HOT 3
- Tk.getMultipleSaveFile does not work on the Mac HOT 6
- Tk::Text listening to a tag covering 1.0 to end stops working after clearing all text (on Mac) HOT 4
- bwidget example error HOT 6
- warning: undefining the allocator of T_DATA class TkUtil::CallbackSubst::Info HOT 2
- extconf.rb ignores config_list.in HOT 3
- Two warnings in tk.rb
- support for ruby3 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tk.