virtualenv icon indicating copy to clipboard operation
virtualenv copied to clipboard

ensure tkinter works in virtualenv

Open yogeshc opened this issue 12 years ago • 9 comments

On a virtualenv I get the following:

DataVizProj)$ python
Python 2.7.3 |CUSTOM| (default, Apr 11 2012, 18:02:54) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> Tkinter.Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/epd/epd-7.3-2-rh5-x86/lib/python2.7/lib-tk/Tkinter.py", line 1685, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    /home/builder/work/core/lib/tcl8.5 /opt/Envs/DataVizProj/lib/tcl8.5 /opt/Envs/lib/tcl8.5 /opt/Envs/DataVizProj/library /opt/Envs/library /opt/Envs/tcl8.5.9/library /opt/tcl8.5.9/library


This probably means that Tcl wasn't installed properly.


>>> quit()
(DataVizProj)$ deactivate 

But it works outside fine once I deactivate it:

$ python
Enthought Python Distribution -- www.enthought.com
Version: 7.3-2 (32-bit)

Python 2.7.3 |EPD 7.3-2 (32-bit)| (default, Apr 11 2012, 18:02:54) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "credits", "demo" or "enthought" for more information.
>>> import Tkinter
>>> Tkinter.Tk()
<Tkinter.Tk instance at 0xb73f7fcc>

I guess this is similar to Issue #56 But this is on Ubuntu based distro

yogeshc avatar May 02 '13 20:05 yogeshc

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

stale[bot] avatar Jan 15 '19 06:01 stale[bot]

This is still an issue on Mac. Someone need to reactivate this issue. Just because it has sat around without getting any traction, that doesn't mean it's no longer an issue. It just means the project maintainers have not prioritized it like they should.

c0d3h4x0r avatar Jan 31 '20 20:01 c0d3h4x0r

Hello, just to clear up things here. Project maintainers "should" do something is a very bad way to look at this. This is an open source project, project maintainers maintain the package, which means they ensure that patches applied don't break the world, as much as possible. If there's issue please look it in the spirit of open source and post a solution pull request, rather then telling them off for not solving it for you.

gaborbernat avatar Jan 31 '20 20:01 gaborbernat

Seems no longer an issue as no one reported it in 3 years.

gaborbernat avatar Jun 27 '23 03:06 gaborbernat

-removed-

LexiconCode avatar Apr 03 '24 03:04 LexiconCode

It's still an issue. We just worked around it in our own systems by copying the right files into the right places ourselves.

c0d3h4x0r avatar Apr 03 '24 18:04 c0d3h4x0r

This issue needs to be reopened. It shouldn't have been closed in the first place.

c0d3h4x0r avatar Apr 03 '24 18:04 c0d3h4x0r

PR welcome.

gaborbernat avatar Apr 03 '24 18:04 gaborbernat

PR welcome.

I apologize my issue ended up being related to the standalone python build not the virtual environment.

LexiconCode avatar Apr 03 '24 20:04 LexiconCode