Python Forum

Full Version: Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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
You need to show the code. It's not possible to guess.
Please show the code within the IDE and from the terminal.
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.
There is something wrong in your PATH.

Post the output from both which python3, echo $PATH commands
(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)
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
(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.
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!
tkinter is Tkinter (capital 'T') on python 3
Pages: 1 2