Python Forum
problem with python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: problem with python (/thread-33472.html)

Pages: 1 2 3


problem with python - raarkil - Apr-27-2021

Hello all! I am new to linux but I like to program and I installed linux mint 20.1, but I got problem with pip, when I writing a code with some module it says that I need to dowload it first via pip but it wont work when i start the script again, can you help me?


RE: problem with python - Barrowman - Apr-27-2021

(Apr-27-2021, 08:29 PM)raarkil Wrote: Hello all! I am new to linux but I like to program and I installed linux mint 20.1, but I got problem with pip, when I writing a code with some module it says that I need to dowload it first via pip but it wont work when i start the script again, can you help me?
Will you post the code you are trying to use and also the command you used to install the module


RE: problem with python - BashBedlam - Apr-28-2021

I too am on a Linux Mint machine and I must use sudo pip3 install <module_name> if I want to have the module available in python3 instead of python2.


RE: problem with python - Barrowman - Apr-28-2021

I did some further checks.
In Mint 20.1 there is only python3 installed.
So I suspect you had to install pip and so installed it as the information said. But pip is for python2 in which case when you installed the module it wasn't accessible from python3.
I think that what you needed to do is install python3-pip which then allows you to install the module for python3 by running
pip3 install <themodule>



RE: problem with python - raarkil - Apr-28-2021

#--------------
#Imports
#--------------
from Tkinter import *
#--------------
# Main Window
#--------------
mainWindow = Tk()
mainWindowTitle = Label(mainWindow, text="Our New GUI")
mainWindowTitle.pack()
mainWindow.mainloop()



RE: problem with python - raarkil - Apr-28-2021

I have started to work on linux system, maybe I must to learn it first, maybe you can give me what I must to know linux first?


RE: problem with python - raarkil - Apr-28-2021

I just want to start to build GUI via Python


RE: problem with python - raarkil - Apr-28-2021


  1. I have dowloaded Python for linux via official site
  2. after that I choose codium text editor to start with
  3. I set python path to folder i dowloaded
  4. I dowloaded pip with this command "apt-get install python-tk"

is this right?


RE: problem with python - perfringo - Apr-28-2021

From Python documentation:

Quote:Note that in general the practice of importing * from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to use it to save typing in interactive sessions.

You can read answers to StackOverflow's Why is "import *" bad? for additional tidbits.


RE: problem with python - raarkil - Apr-28-2021

(Apr-28-2021, 09:15 AM)perfringo Wrote: From Python documentation:

Quote:Note that in general the practice of importing * from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to use it to save typing in interactive sessions.

You can read answers to StackOverflow's Why is "import *" bad? for additional tidbits.
thanks so what I can do?