replit / prybar

Pry open those interpreters.
GNU General Public License v2.0
253 stars 52 forks source link

Use python38Full in prybar-python3 so native packages work #87

Closed lincoln-replit closed 2 years ago

lincoln-replit commented 2 years ago

Using native packages such as tkinter with prybar-python3 doesn't currently work.

~$ prybar-python3 -i
Python 3.8.12 (default, Aug 30 2021, 16:42:10) 
[GCC 10.3.0] on linux
--> import turtle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/wlhmpa2qk786ddp05ahv3jjlds6d44a5-python3-3.8.12/lib/python3.8/turtle.py", line 107, in <module>
    import tkinter as TK
  File "/nix/store/wlhmpa2qk786ddp05ahv3jjlds6d44a5-python3-3.8.12/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'

Switching to python38Full instead of just python38 solves the problem.

~/turtle-test/prybar$ nix-build -A prybar-python3
/nix/store/3d3clwdpdivm30xi3vaphv6fwla22l0p-prybar-python3-0.0.0-dirty
~/turtle-test/prybar$ /nix/store/3d3clwdpdivm30xi3vaphv6fwla22l0p-prybar-python3-0.0.0-dirty/bin/prybar-python3 -i
Name is /home/runner/turtle-test/venv/bin/python
Python 3.8.12 (default, Aug 30 2021, 16:42:10) 
[GCC 10.3.0] on linux
--> import turtle
--> 
replbot commented 2 years ago

Good work, this PRs short and easy to review! Promoting to bop.

replbot commented 2 years ago

unbooping: approved