I used to use pyenv
as my version manager but it had too much trouble installing packages so I'm moving over to virtualenv
. So when I activate my virtual environment and write: which python
I get:
/Users/kylefoley/codes/venv/bin/python
But when I actually use python it seems that it is still using pyenv
. For example:
(venv) Admins-MacBook-Pro-4:~ kylefoley$ python
Python 3.8.0 (default, Nov 28 2019, 02:43:40)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Tk'
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Tkinter'
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/kylefoley/.pyenv/versions/3.8.0/lib/python3.8/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
I'm not trying to fix the problem of not being able to use Tkinter
rather I just want to understand why this line:
File "/Users/kylefoley/.pyenv/versions/3.8.0/lib/python3.8/tkinter/__init__.py", line 36, in <module>
is coming up.