0

I have been having problems importing Tkinter. I have done research here and found that it's because I have had both 64 bit and 32 bit python on my machine. I currently use 32 bit but Tkinter is pointing to the 64 bit version. I think the easiest fix is to uninstall python and reinstall it. Will I loose all my downloaded libraries and code I've written if I do this?

It's python 2.7 on Windows 7.

user2242044
  • 8,803
  • 25
  • 97
  • 164
  • Both Python for 32 bit or 64 bit architecture should come with their own distribution of `Tkinter`... – nbro Jan 07 '15 at 02:50
  • right but the issue occurs when you have both versions installed. The references get crossed and 32 bit python tries to pull in 64 bit Tkinter. http://stackoverflow.com/questions/8724729/python-tkinter-on-windows/26259064#26259064 – user2242044 Jan 07 '15 at 02:52
  • My question is: why do you need 2 versions of Python for different architectures? – nbro Jan 07 '15 at 02:54
  • I don't. When I was new to Python trying to figure it out, I installed both versions. I soon realized many packages didn't work with 64 bit so I started using 32 bit. I guess I was unable to fully remove all traces of 64 bit. From reading around, it's easiest to just uninstall and reinstall – user2242044 Jan 07 '15 at 02:56

1 Answers1

1

All the downloaded libraries are in the C:\Python27\Lib\site-packages. You can check this folder before you uninstall a version of Python.

I agree with Rinzler, for Python, both versions will have its own Tkinter. Maybe it's just a problem of interpreter choice of your IDE.

Stephen Lin
  • 4,852
  • 1
  • 13
  • 26
  • What exactly am I checking for?....still pretty new to this stuff. I think it is the IDE pointing to the wrong version. How can I tell it which one to point to? – user2242044 Jan 07 '15 at 02:58
  • If you want to delete Python, you have to make sure in this folder there is nothing you want to keep. BTW, what IDE are you using? – Stephen Lin Jan 07 '15 at 03:00
  • so if I copy those to some other folder then copy them back in, I shouldn't loose them? I am using PyCharm Community Edition 3.4.1, but have also tried this through CMD. – user2242044 Jan 07 '15 at 03:03
  • @user2242044 No, you have to remenmber the name and re-install them to the right version. For instance, you have uninstalled Python 64bit, then you have to find libraries for Python 32 bit and re-install all of them. – Stephen Lin Jan 07 '15 at 03:10
  • I would put PyCharm away for the time being and see if you can get the import to work with programs you run in the cmd window. Once you get that sorted, you can worry about configuring PyCharm. – 7stud Jan 07 '15 at 03:15
  • Thanks did the reinstall. Tkinter is working and I'm now reinstalling some packages I need. – user2242044 Jan 07 '15 at 03:22