![]() ![]() Specifically you should be able to find the right directory.Īs a last resort hack, you could change the print statement added to _init_.py add the directory, but I'd only do that if you are pressed for time (which probably isn't the case if you are asking on StackOverflow) or are totally frustrated and setting the environment variable doesn't work. sudo port install pkgconfig openssl xz gdbm tcl tk +quartz Then, for Python 3. ![]() And compare the with the value that works. To understand what's missing, before line 38 of of /opt/python3/lib/python3.4/tkinter/_init_.py add a import sys print(sys.path). Open terminal from system application menu, and run command to add the PPA: sudo add-apt-repository ppa:deadsnakes/ppa. Or PYTHONPATH=":/usr/local/lib/python3.4/dist-packages/pyficache-0.2.6-p圓.4.egg" apt-get install. This mostly works, but they mess with Python's default directory hierarchy, and some applications fail to use Python in this way. ![]() python-tk is python’s de facto of GUI, which can come in handy if you are building a graphical user interface application: sudo apt install -y python3.11-tk Install python3.11-gdm. The equivalent would be PYTHONPATH = ":/usr/local/lib/python3.4/dist-packages/pyficache-0.2.6-p圓.4.egg" Note that the Debian - and Ubuntu - systems devised a way to run parallel official Python's in /usr, and to have apt-get to install Python packages to both Python versions at once. sudo apt-get install python3-tk python3-tk is already the newest version (3.7.3-1ubuntu1) python -c 'import tkinter' - ImportError: No module named 'tkinter' before I find /. sudo apt install -y python3.11-dev Install python3.11-tk. Set PYTHONPATH before you run apt-get to the corresponding value printing. array Remove modbus-tk imports and add minimalmodbus import minimalmodbus. sudo apt-get install python3-tk Fedora sudo dnf install python3-tkinter MacOS brew install python-tk Share. Build a Ubuntu docker with Python3 and pip support. sudo apt-get install python-pip pip install. Go into the python3 shell that works and run import sys print(sys.path). Installed Dependencies apt-get gcc g++ git zlibc zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev. Specifically what is important is the value of sys.path. My guess is that you will need to change and environment variable, specifically environment, specifically PYTHONPATH before you run 'apt-get'.īut we need more details here. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |