Python Forum
Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux (/thread-2679.html)

Pages: 1 2


Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - harun2525 - Apr-02-2017

hello i am new on python3. i passed to python3 from python2.

while i am using python3 on idle-shell, python3 not giving any import error. but while i am using python3 on terminal, python3 giving too many import error.
i did not understand why is python3 giving import error while i am on terminal.

Thanks.


RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - Larz60+ - Apr-02-2017

Python 3:
Tkinter now tkinter
gi ? http://packages.ubuntu.com/search?keywords=python3-gi
setuptools: https://pypi.python.org/pypi/setuptools/3.3

I would find something better than idle, try PyCharm community or atom
idle does some weird stuff


RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - Barrowman - Apr-02-2017

You need to show the code. It's not possible to guess.
Please show the code within the IDE and from the terminal.


RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - harun2525 - Apr-02-2017

I solved, python3 command is not working correctly. i run /usr/bin/python3 command instead of it. that works correctly.

Do you know what are the differences of two commands ?

Thanks for helps.


RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - wavic - Apr-02-2017

There is something wrong in your PATH.

Post the output from both which python3, echo $PATH commands


RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - harun2525 - Apr-02-2017

(Apr-02-2017, 02:08 PM)wavic Wrote: There is something wrong in your PATH.

Post the output from both which python3, echo $PATH commands

/usr/bin/which: no python3, in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/lorderon/.local/bin:/home/lorderon/bin)
/usr/bin/echo
/usr/bin/which: no bin in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/lorderon/.local/bin:/home/lorderon)



RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - wavic - Apr-02-2017

Here is what I've asked for.

Output:
victor@jerry:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin victor@jerry:~$ which python3 /usr/bin/python3



RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - harun2525 - Apr-05-2017

(Apr-02-2017, 02:47 PM)wavic Wrote: Here is what I've asked for.

Output:
victor@jerry:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin victor@jerry:~$ which python3 /usr/bin/python3


which python3 command gives "/usr/local/bin/python3" output.
i understand now why does python3 give error because i am using /usr/bin/python3 but python3 command doesn't mean this path. how to change my python3 command path ? Thx.

i solved it with running " export PATH=/usr/bin:$PATH ". it worked. but "/usr/bin" path is duplicated in PATH values so i deleted second same path.


Note:
How can i add the solved tag on topic.


RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - nzcan - Aug-08-2018

Quote:i understand now why does python3 give error because i am using /usr/bin/python3 but python3 command doesn't mean this path. how to change my python3 command path ? Thx.

the same problem by me.

i am running python 2.7.6 and python 3.6.1 on linux mint 17.3 simultaneously.
the output of 'which python' is:
Output:
/usr/bin/python
the output of 'which python3' is:
Output:
/usr/local/bin/python3
the output of 'echo $PATH' is:
Output:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
with the command 'python3' in the linux-terminal i am starting the python 3.6.1 version interactive
mode of the interpreter and ... it works normally ... except that when i import 'tkinter module' with the command 'import tkinter' it gives me error:
Output:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/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'


some ideas how to solve this error?
thanks in advance!


RE: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux - Larz60+ - Aug-08-2018

tkinter is Tkinter (capital 'T') on python 3