Make a Weather App in Python | Weather API | Python Project

Поділитися
Вставка
  • Опубліковано 8 лют 2025

КОМЕНТАРІ • 145

  • @CodingWithEvan
    @CodingWithEvan  4 роки тому +22

    To get your API Key: Login to openweathermap then goto "My API Keys" under your profile name. There you will find your API key.

  • @CurrentElectrical
    @CurrentElectrical 4 роки тому +8

    Had an awesome day building 3 of your in depth build alongs.
    Thank you for explaining along the way as a newcomer with no experience, I feel I learned quite a bit.
    I look forward to many more build along videos.
    Thank you for Canada!

  • @qtip_cs
    @qtip_cs 3 роки тому +22

    to save people time, the api allows you to return imperial or metric measurements by adding "&units=imperial" before the appid

  • @Clapham888
    @Clapham888 3 роки тому +3

    This is fantastic, thank you! Did it from start to finish :)

  • @umarhasnain7369
    @umarhasnain7369 3 роки тому

    ভালোই হইল। এপিআই ও শিখে নিলাম এখান থেকে টুকটাক।

  • @jrm3488
    @jrm3488 3 роки тому +1

    Very good project I was able to follow along and actually finish it!

  • @Spex07
    @Spex07 3 роки тому +1

    hi
    thanks your vids help me a lot, i am able to do stuff i did not know how to.
    Thank you Mr Evan

  • @chodavarapuudaykumar9204
    @chodavarapuudaykumar9204 2 роки тому +2

    Hey I got an error
    Traceback(most recent call last): line 2, in
    Import requests
    ModuleNotFoundError: No module named requests
    Can you please rectify this error

    • @sagarkotian7178
      @sagarkotian7178 2 роки тому

      Hey even I got the same error

    • @sagarkotian7178
      @sagarkotian7178 2 роки тому

      Did you get the solutions

    • @chodavarapuudaykumar9204
      @chodavarapuudaykumar9204 2 роки тому

      @@sagarkotian7178 yes, I got it you to install requests module. For that you go to terminal and type pip install requests.

  • @ROHANSHARMA-q2h
    @ROHANSHARMA-q2h Рік тому +1

    Heyy!!
    When I am running my program it is showing "no module named requests"
    Can you pls tell what to do ??

    • @guharajdeep
      @guharajdeep Рік тому

      you can change the import to this - import pip._vendor.requests as requests

  • @habiborrahaman4531
    @habiborrahaman4531 4 роки тому

    Bhaiya apner video gula very higher level , i like your video tutorial. bhaiya bangla te korle aro besi halpfull hoyto amader jonno.

  • @xkiarax45
    @xkiarax45 6 місяців тому +1

    ⁠please may you help me I’m getting a message that’s says “error : pips dependency resolver does not currently take into account all the packages …. And it’s still saying “no module named requests

  • @ngonidzashemwanjira208
    @ngonidzashemwanjira208 2 роки тому +2

    I am getting an error that says, " No module named requests." on PyCharm.What do I do?

    • @sammyofficial1
      @sammyofficial1 2 роки тому

      If you have pip installed in your computer, go to cmd prompt or terminal and type, pip install requests

  • @md.shahinhossainshuva5436
    @md.shahinhossainshuva5436 3 роки тому +2

    Please make a video for the same thing as an apk(android application). Thank you.

  • @muzrobbaratov8278
    @muzrobbaratov8278 3 роки тому

    Great, thank you Mr Evan

  • @hardikrathod4282
    @hardikrathod4282 2 роки тому +1

    i have error in textfield and and showing city not difine

  • @wernerdebarros
    @wernerdebarros 4 роки тому +2

    Amazing!
    Do you know make a map with quiser with vectors?

  • @bimsathmahanama6611
    @bimsathmahanama6611 3 роки тому +1

    In my one Its showin wrong API key erorr can you tell me what Ineed to do

  • @Me_SaifAli
    @Me_SaifAli 3 роки тому

    not showing Accurate Temp. even not showing max and min temperature but other things like humidity pressure are working well. please help

  • @HimanshuKumar-fg2go
    @HimanshuKumar-fg2go 4 роки тому

    I hope more videos are coming soon👍👌

  • @doidorafael4
    @doidorafael4 Рік тому

    hey great video , how do u add the celsius symbol ?

    • @doidorafael4
      @doidorafael4 Рік тому

      its Alt + 0176 btw for anyone interested

  • @Skayter122
    @Skayter122 3 роки тому +1

    i dont get what u get on the 5:53

  • @s.devadathan4476
    @s.devadathan4476 3 роки тому

    I am your No.1 fan

  • @vicky-yf6ld
    @vicky-yf6ld 3 роки тому +2

    Its showing Problem-Import "requests" could not be resolved from source,
    So I added "pip install requests2"
    But again showing the same problem
    Please fix this

  • @Shikshasansaar
    @Shikshasansaar 3 роки тому

    This app is created in pycharm or anywhere else. I have not much experience of application.

  • @mihirsalunkhe8242
    @mihirsalunkhe8242 3 роки тому +2

    Can you help me I am getting a error in the import requests
    I have done pip install request in command prompt
    In that I am getting module named error request

    • @CodingWithEvan
      @CodingWithEvan  3 роки тому +2

      Try pip install requests2

    • @mihirsalunkhe8242
      @mihirsalunkhe8242 3 роки тому

      @@CodingWithEvan thank you got it

    • @xkiarax45
      @xkiarax45 6 місяців тому

      @@CodingWithEvanplease may you help me I’m getting a message that’s says “error : pips dependency resolver does not currently take into account all the packages …. And it’s still saying “no module named requests

  • @nirajpawar4986
    @nirajpawar4986 2 роки тому

    Can u please help me there is project in my clg and i have to create blackbook on the same weather in python topic!!!

  • @mustufashahid646
    @mustufashahid646 3 роки тому +2

    Pycharm is okay to built this project? And which libraries are pre requisite for this project please let me know, thanks.

    • @panva9948
      @panva9948 3 роки тому

      I would recommend using the software he is using

  • @factzsocial6639
    @factzsocial6639 2 роки тому +1

    Facing tclerror anyone help me

  • @TG21316
    @TG21316 2 роки тому

    I am getting error
    In get weather condition
    'weather' what is the solution

  • @zackcordle4814
    @zackcordle4814 3 роки тому

    How much should i subtract from the gm time if I am in US EST?

  • @chinmaykrishna7700
    @chinmaykrishna7700 3 роки тому +2

    I am using visual studio code, and I am facing this issue: ModulenotFound: No module named Tkinter

    • @doritoaregood973
      @doritoaregood973 3 роки тому +2

      there is no capital t in tkinter. You should write import tkinter as tk.

  • @shyamalineje204
    @shyamalineje204 3 роки тому

    What is that postman thing

  • @ammysaini10
    @ammysaini10 2 роки тому

    at 10:39 what is the meaning of this (main) ??? Can someone tell please?

  • @SatyamGupta-yq1pt
    @SatyamGupta-yq1pt 3 роки тому

    Working , thanks bro❤️

  • @m_abhijit_
    @m_abhijit_ 3 роки тому +1

    thanks buddy :)

  • @anndawson
    @anndawson 3 роки тому +1

    Followed pretty easy but no matter what I do, my code runs into an error on line 10, format correct. My API is correct and runs on a similar APP I did (with no tkinter) so I know my API is valid and working but does not like my JSON format but my API keeps saying invalid. Please help

    • @sagarkotian7178
      @sagarkotian7178 2 роки тому

      Hey even am facing the same problem please someone help

  • @sivaprakash5877
    @sivaprakash5877 3 роки тому

    From where you learnt this all informations? Please reply me

  • @rohanroy9994
    @rohanroy9994 3 роки тому +2

    Sir, I am having a problem about import request error please sir give solution

  • @muhammedbasheerkk8871
    @muhammedbasheerkk8871 4 роки тому +3

    Bro, Which code editor you using ?
    - pycharm
    - Vs code

  • @gayusg4382
    @gayusg4382 3 роки тому +1

    I'm getting error in the line canvas.geometry ("600*500") it shows that it is a bad geometry specifier.. Plz help me

    • @CodingWithEvan
      @CodingWithEvan  3 роки тому

      replace "*" with "x"

    • @gayusg4382
      @gayusg4382 3 роки тому

      @@CodingWithEvan Yeah got it... Thank you for you reply

  • @Arohanaedu
    @Arohanaedu 3 роки тому

    Hi, for me it showing exception in tkinter callback

  • @ashabjunidh6786
    @ashabjunidh6786 4 роки тому +1

    Hy,i am getting an error in final_info=condition+"
    "+str(temp)+"°C" line. I don't know what is rong there i followed everythng as u showed

    • @CodingWithEvan
      @CodingWithEvan  4 роки тому

      I need to see your code. You can send it here or dm me on facebook.

    • @ashabjunidh6786
      @ashabjunidh6786 4 роки тому

      @@CodingWithEvan can u tell me ur fb id?

  • @vidhi_bhatt
    @vidhi_bhatt 3 роки тому

    How do I apply CSS here? I am getting errors if I try to change the f and t variables.

  • @duarteandre_
    @duarteandre_ 4 роки тому +1

    Hey, im getting an error called module not found error: no module named requests, can you help me pls

    • @emranevan
      @emranevan 4 роки тому

      go to terminal and write "pip install requests" then hit enter.

    • @duarteandre_
      @duarteandre_ 4 роки тому

      @@emranevan it keeps giving me the same error

    • @vervainsleeping4140
      @vervainsleeping4140 3 роки тому

      @@duarteandre_ same

    • @duarteandre_
      @duarteandre_ 3 роки тому

      @@vervainsleeping4140 i tried it with pycharm and now its working

    • @eaglefoundation
      @eaglefoundation 3 роки тому

      @@duarteandre_in VS code after pip install requests, you need to close that terminal and then reopen it. It will then import your module.

  • @nolyboy1232
    @nolyboy1232 3 роки тому +2

    how do i make it in Fahrenheit?

    • @pythonprospect532
      @pythonprospect532 2 роки тому

      You can easily configure units through typing "&units=Imperial" or Metric right before the city

  • @rilexd5755
    @rilexd5755 2 роки тому

    How i can edit look of this

  • @yulianarojasv1696
    @yulianarojasv1696 3 роки тому

    Evan mi amor besos y gracias por el tutorial, me has ayudado con un proyecto muy importante

  • @karoom5067
    @karoom5067 2 роки тому

    It worked thanks alot

  • @sridhargumpula
    @sridhargumpula 3 роки тому +1

    My Commands Are Telling That Requests Command Is Not Working Pls Tell How To Fix That!

    • @pythonprospect532
      @pythonprospect532 2 роки тому

      type in pip install requests within the console window if you are using vs code

  • @nandanaviswanath5413
    @nandanaviswanath5413 3 роки тому

    hey Evan actually I am a beginner,so dont get pissed off on my question. Can I use this project in my resume in the future?

  • @theforestlover4873
    @theforestlover4873 3 роки тому

    bro, what is postman ?

  • @mdtausifahmed1375
    @mdtausifahmed1375 3 роки тому

    nice one bro

  • @IsmailKhan-fg2vj
    @IsmailKhan-fg2vj 3 роки тому

    Is there anything in this related to machine learning????

  • @kshitijgoel9049
    @kshitijgoel9049 3 роки тому +1

    Where to write this code?

  • @sanskargubreley8754
    @sanskargubreley8754 2 роки тому

    Best Vedio!

  • @jaggitsingh9892
    @jaggitsingh9892 3 роки тому

    can i use * instead of the multiplication symble

  • @muzaffarkhatib5040
    @muzaffarkhatib5040 3 роки тому

    bro how to go Postman site

  • @pedromartins6513
    @pedromartins6513 2 роки тому

    In mine, always show "SyntaxError: invalid sintax

  • @VatsalRohatgi
    @VatsalRohatgi Рік тому

    I tryed same but not make clock

  • @muhammadrafly9279
    @muhammadrafly9279 3 роки тому

    may I ask for the code to be part of my college assignment?

  • @kindwr
    @kindwr 3 роки тому

    I encountered this error: unresolved import 'requests'. What can I do?

    • @Clapham888
      @Clapham888 3 роки тому

      You need to install the requests package in your development suite. Which one are you using?

    • @pythonprospect532
      @pythonprospect532 2 роки тому

      try simply typing: pip install requests within the console itself

  • @muhammadbabar9836
    @muhammadbabar9836 4 роки тому +1

    Can we create in pycharm?

  • @avegealseneres4557
    @avegealseneres4557 2 роки тому

    How can i add a background picture ?

  • @ajinkyashama9809
    @ajinkyashama9809 3 роки тому

    I have an error... Attributeerror: module tkinter has no attribute TK
    What can i do??

    • @CodingWithEvan
      @CodingWithEvan  3 роки тому +1

      Bro It's Tk, Capital T and small k.

    • @ajinkyashama9809
      @ajinkyashama9809 3 роки тому

      @@CodingWithEvan yeah it's work..thank you so much❤️

  • @manishuike4248
    @manishuike4248 3 роки тому

    how to add css in the code?

  • @sonaligoyal8326
    @sonaligoyal8326 2 роки тому +4

    Exception in Tkinter callback
    Traceback (most recent call last):
    File
    return self.func(*args)
    File "c:\Python Project\weather_app.py", line 14, in getWeather
    condition= json_data['weather'][0]['main']
    KeyError: 'weather'
    I am getting this error, Can anyone please help

  • @madcuzbad4467
    @madcuzbad4467 3 роки тому

    there is (canvas=tk.tk()
    AttributeError: module 'tkinter' has no attribute 'tk') error in my file . How to fix this thank you

    • @CodingWithEvan
      @CodingWithEvan  3 роки тому +2

      It's "canvas=tk.Tk()"
      You missed the capital letter.

    • @madcuzbad4467
      @madcuzbad4467 3 роки тому

      @@CodingWithEvan Thank you so much

  • @Bluva
    @Bluva 3 роки тому

    in __call__
    return self.func(*args)
    File "c:\PythonPrograms\Clima\clima.py", line 12, in getWeather
    condition = json_data['weather'][0]['main']
    TypeError: 'method' object is not subscriptable

    • @kuldeepxd519
      @kuldeepxd519 3 роки тому

      I am getting the same error did you find the solution?

    • @Bluva
      @Bluva 3 роки тому

      @@kuldeepxd519 I’ve solved it but I don’t remember how

    • @TG21316
      @TG21316 2 роки тому

      Did you remember

  • @archieplays7734
    @archieplays7734 4 роки тому

    can you make a video how to download python and set up?

  • @prannavkarthikeyan7165
    @prannavkarthikeyan7165 3 роки тому

    NameError: name 'textfield' is not defined
    What to do wtih this?? anyone??

  • @samreenkhizer7982
    @samreenkhizer7982 2 роки тому

    Which software is it

  • @shyamalineje204
    @shyamalineje204 3 роки тому

    Are you from Bangladesh?

  • @sameerdas2468
    @sameerdas2468 3 роки тому

    Sir can i use the same api key 🙏🙏🙏

    • @CodingWithEvan
      @CodingWithEvan  3 роки тому

      You can. But not sure if it will work or not.
      You can get your own api key from their website. It's free.

  • @coldsavagegod7101
    @coldsavagegod7101 3 роки тому +1

    It is so confusing how to get the API, please make it clearer

  • @bunnygaming1820
    @bunnygaming1820 3 роки тому

    i m from lahore

  • @rajasekark7131
    @rajasekark7131 3 роки тому

    TCL error bad geometry specifier 600x500

  • @taurohkea2169
    @taurohkea2169 3 роки тому

    thank you evan but if you enter invalid request app crashes
    the page gives """cod: '200' """ result to me if entry is valid. and you get cod: "404" if you enter asdasdqasdad
    you could write a basic if statement to give error message

  • @NINJAOP
    @NINJAOP 3 роки тому

    Thanks /\

  • @TG21316
    @TG21316 2 роки тому

    here is my code

  • @immybh9638
    @immybh9638 2 роки тому

    I couldn't subscribe because its paid now... not free. :_(

  • @TG21316
    @TG21316 2 роки тому

    import tkinter as tk
    import requests
    import time
    def getWeather(canvas):
    city = textfield.get()
    api = "api.openweathermap.org/data/2.5/weather?q=" + city +"India&appid=5b5d290f66bedfd0d48aacf96faa0091"
    json_data = requests.get(api).json()
    condition = json_data['weather'][0]['main']
    temp = int(json_data['main']['temp'] - 273.15)
    min_temp = int(json_data['main']['temp_min'] - 273.15)
    max_temp = int(json_data['main']['temp_max'] - 273.15)
    pressure = json_data['main']['pressure']
    humidity = json_data['main']['humidity']
    wind = json_data['wind']['speed']
    sunrise = time.strftime("%H:%M:%S", time.gettime(json_data['sys']['sunrise']-21600))
    sunset = time.strftime("%H:%M:%S", time.gettime(json_data['sys']['sunset']-21600))
    final_info = condition + "
    " + str(temp) + "°C"
    final_data = "
    " + "Max Temp: " + str(max_temp) + "
    " + "Min Temp: " + str(min_temp) + "
    " + "Pressure: " + str(pressure) + "
    " + "Humidity: " + str(humidity) + "
    " + "Wind Speed: " + str(wind) + "
    " + "Sunrise: " + sunrise + "
    " + "Sunset: " + sunset
    label1.config(text = final_info)
    label2.config(text = final_data)
    canvas = tk.Tk()
    canvas.geometry("600x500")
    canvas.title("Weather App")
    f = ("poppins", 15, "bold")
    t = ("poppins", 35, "bold")
    textfield = tk.Entry(canvas, font = t)
    textfield.pack(pady = 20)
    textfield.focus()
    textfield.bind('', getWeather)
    label1 = tk.Label(canvas, font = t)
    label1.pack()
    label2 = tk.Label(canvas, font = t)
    label2.pack()
    canvas.mainloop()

    • @christiancraigen3331
      @christiancraigen3331 Рік тому

      Exception in Tkinter callback
      Traceback (most recent call last):
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 1948, in __call__
      return self.func(*args)
      ^^^^^^^^^^^^^^^^
      File "c:\Users\Christian.Craigen.CORDISH\OneDrive - Live! Casino and Hotel\Documents\Test Folder Python VS Code\Weather API Proj", line 9, in getWeather
      condition = json_data['weather'][0]['main']
      ~~~~~~~~~^^^^^^^^^^^
      TypeError: 'method' object is not subscriptable Getting this Error when typing in a city for example

  • @factzsocial6639
    @factzsocial6639 2 роки тому

    Facing tclerror anyone help me out