May-15-2017, 10:34 PM
hi i have a great problem I insalled python3.5 and deleted python3.4 and installed pygobject3.18.2 on python3.5 64 bit but after installation, when I import gi module, python give no module named error! please help me.
PyGtk3, No Module Named gi, on python3.5 on Windows
|
May-15-2017, 10:34 PM
hi i have a great problem I insalled python3.5 and deleted python3.4 and installed pygobject3.18.2 on python3.5 64 bit but after installation, when I import gi module, python give no module named error! please help me.
May-15-2017, 10:45 PM
Quote:when I import gi module, python give no module named errorAre you sure you are using the python3.5 interpreter when you get this error? If you are using an IDE, verify that the interpreter is changed to the new one. did you install pyobject from your distro's repos? Quote:metulburr@ubuntu:~$ sudo apt-cache search pygobjectand go through their install process? http://python-gtk-3-tutorial.readthedocs...stall.html Quote:hi i have a great problem I insalled python3.5 and deleted python3.4Why would you do this? Is there some feature you wanted to use in python3.5.x?
Recommended Tutorials:
@metulburr,
yes, python3.5 allows {**ab, **bc} expression and this is important to me in my pc there are two os, first: windows, second: fedora, there is no any error with gtk3 in fedora on python3.5. but python3.5 on my windows7 giving this error. why does same python version give error on windows and why doesn't give any error on fedora ? i can't install from repo because this problem in windows7 so i installed offical pygobject3.18.2 version for windows.
i met new problem, i installed pygtk3 on python3.5 and pygtk3 gave new error:
>>> import gi Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files\Python35\lib\site-packages\gi\__init__.py", line 42, i <module> from . import _gi ImportError: Module use of python34.dll conflicts with this version of Python.please help me. up to date.
May-16-2017, 10:04 PM
(May-16-2017, 09:04 PM)harun2525 Wrote: ImportError: Module use of python34.dll conflicts with this version of Python.Is Python3.5 in your PATH?
Recommended Tutorials:
@metulburr,
yes. i didn't understand, python3.5 on fedora can contain pygtk3 module but python3.5 on windows can't contain pygtk3. why same version do this on different os ?
Follow this
What this dos is build a full environment with Python3.5 and Python 2.7. So it can be a little confusing,you don't use your own Python OS installation. pacman command build full environment. After i follow the steps, have all in C:\msys32\mingw32\bin So i save gtk_test.py in that folder#gtk_test.py import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk window = Gtk.Window(title="Hello World") window.show() window.connect("delete-event", Gtk.main_quit) Gtk.main()Now i can choose to run with 3.5 or 2.7 both work(they are build from scratch). [Image: 5WsZZG.jpg] [Image: sfmTal.jpg]
@snippsat,
thanks for answer yes perhaps it works but this solution requires disk space too much, I'll try. I can't install python3.5 to msys2 (May-19-2017, 08:56 AM)harun2525 Wrote: I can't install python3.5 to msys2You don't install python3.5,it's get built. In this link same approach,you can build for only Python 3.5. Quote:If you develop in Python 3: Not using pacman and build this yourself(Visual Studio) can be nightmare.The size will be somewhat large anyway,PyGObject(GTK 3+) has dependencies of at least 20 libraries. Look at this blog. Up to Python 3.4 there are "exe" build here. This is what you have used before. It install into a exciting Python 3.4 install. Tool over do it in a other way,they build all PyGObject including Python 3.5. |
|