Python Virtual Environment and pip for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 54

  • @garrettswenson794
    @garrettswenson794 3 หลายเดือนก่อน

    All I needed was to figure out how to install packages on vsc since I only ever used pycharm for months and this was the first video that actually showed me that you have to tap in to "py -m" first, no other videos showed that, so thank you

  • @liorp4640
    @liorp4640 หลายเดือนก่อน

    This is great ! Thanks !
    For the weather example - I also added a "raise" exception" (following your exception tutorial) in case a city is not found ( weather_data["cod"] == "404")

  • @pravin9803
    @pravin9803 4 วันที่ผ่านมา

    Thanks a lot for such an informative and useful video. Learnt a lot of new things from this one video, than from multiple other videos. Also you are a great teacher. You have explained the points in a very simple and linear way. Appreciate it.

  • @ahmad-murery
    @ahmad-murery ปีที่แล้ว +5

    You may want to add pip directory to the *Path* system environment variable, this way you can call it directly without adding *py -m* in front of it.
    I prefer using the *source* command unless I'm in a bad mood I'll use the dot (.) as a shortcut
    Thanks Dave!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +3

      Good additions, Ahmad! I hope you are well my friend!

    • @ahmad-murery
      @ahmad-murery ปีที่แล้ว +1

      @@DaveGrayTeachesCode little busy but I'm ok, and I hope you're well too.
      Thanks for asking my friend!

  • @jakkdlaw
    @jakkdlaw 2 หลายเดือนก่อน

    perfect tutorial, you really saved me today. The confusion from today's class is gone.

  • @adriantworek1057
    @adriantworek1057 ปีที่แล้ว +5

    Amazing work Dave! Thank you for this series. I hope you will record some web development stuff with Python (Django or FastAPI) in the near future.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +4

      That's the plan! More Python coming after the beginners series.

  • @abuzain859
    @abuzain859 ปีที่แล้ว +1

    i am learning python from udemy when i get stuck I come to TH-cam and search for my favorite content creator Dave Gray to find asolution 😍😍

  • @sholle7
    @sholle7 3 หลายเดือนก่อน

    Hi Dave! This was very helpful. I am a Python beginner and I find that you explain things that a lot of instructors forget (the curse of knowledge). I do have a question though. As you were typing in the function it showed it created a test. Can you tell me what extension you are using? And do you have any suggestions on extensions?

  • @ela2112
    @ela2112 10 หลายเดือนก่อน +2

    Clear and complete. Nicely done. Thanks.

  • @kcell2042
    @kcell2042 ปีที่แล้ว

    Appreciate.
    The official Python recommendation is pipenv. I'm also looking forward to the Pipenv lesson.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว +1

      Thanks - it seems venv used to be and pipenv just got the recommendation in 2022. I won't double up on these in this series, but maybe another look in the future. The overall concept and goal works with either.

  • @michaelscofield5343
    @michaelscofield5343 ปีที่แล้ว +1

    thanks sir, if you could explain some python modules after ending this course ❤.

  • @jamescaleb9676
    @jamescaleb9676 6 หลายเดือนก่อน +1

    awesome. best programming teacher on TH-cam!

  • @maxpopov6882
    @maxpopov6882 8 หลายเดือนก่อน

    So glad that I stumbled on your channel. Than you very much good sir!

  • @xzex2609
    @xzex2609 11 หลายเดือนก่อน +2

    In windows I could never activate the venv with Source , I just run the activate.bat .

    • @quaternion-pi
      @quaternion-pi 10 หลายเดือนก่อน +3

      In windows terminal "source .venv\Scripts\activate", "source" was not recognized as a command. ".\.venv\Scripts\activate " starts virtual env. Great tutorial.

    • @tamangteppiche8344
      @tamangteppiche8344 5 หลายเดือนก่อน

      How do i run this with source. It doesn’t work.

  • @nirmesh44
    @nirmesh44 ปีที่แล้ว +1

    Great way to explain as always.

  • @tw9535
    @tw9535 ปีที่แล้ว

    Damn that's so good! Thank you so much for your time and teaching style! A+
    On the virtual environments, if the .py file is stored/run from a different environment (or anyplace else), is there a way at the top of the script to force it to use the python.exe and dependencies in THIS one-- the one (virtual environment) that we just created?
    That is something about virtual environments that I am not clear on yet.
    Thank you!

  • @kahvelikod
    @kahvelikod 2 หลายเดือนก่อน

    Thank you 👌

  • @johnforeverrules
    @johnforeverrules ปีที่แล้ว +1

    hello dave sir. after python series, are you going to teach django or flask(or both)? thanks in advance for your reply

  • @user-xi6vc3kq2e
    @user-xi6vc3kq2e ปีที่แล้ว

    Do you think of creating a NestJS course? We hope so.

  • @utinthein7274
    @utinthein7274 ปีที่แล้ว +1

    Thanks you, Sir

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      Welcome!

    • @utinthein7274
      @utinthein7274 ปีที่แล้ว

      @@DaveGrayTeachesCode ❤❤ ❤
      sir, you reply late.
      Are you very busy with heavy work. SIR

  • @lorenzasaettone8466
    @lorenzasaettone8466 2 หลายเดือนก่อน

    can you prepare a quick tutorial about a web app with flask and API by llm openai. The goal is to answer right to a quiz, and got checked answers, which are not simple yes or nos or fixed words?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 หลายเดือนก่อน +1

      Nice suggestion! I have a Python Flask REST API tutorial coming up next week. The LLM addition might make a nice follow up.

    • @lorenzasaettone8466
      @lorenzasaettone8466 2 หลายเดือนก่อน

      @@DaveGrayTeachesCode thanx!!! :)

  • @placidaorlunwo5012
    @placidaorlunwo5012 3 หลายเดือนก่อน

    I am having challenges installing pakages to the .venv. After I activate and install the installed package doesn't appear in the library. Please how can I resolve this?

  • @xzex2609
    @xzex2609 11 หลายเดือนก่อน

    thank you for your Great work , I think one thing was not clarified at the end and we creates some .gitignore and .env files to protect our API KEY but in the end I didn't understand the next step is just commit the project to git hub ? or there is more to it ? I appreciate if some one help me understand it.

  • @ledders27
    @ledders27 9 หลายเดือนก่อน +1

    What am I doing wrong? Any help greatly appreciated.
    from dotenv import load_dotenv
    Import "dotenv" could not be resolved Pylance
    I've followed the steps of setting up the virtual environment, I can see in the requirements.txt python-dotenv=1.0.0. I'm using python 3.11.1. This also happens on lesson 23 with dotenv and flask.

    • @juicymoose9693
      @juicymoose9693 6 หลายเดือนก่อน

      i have the same issue, did you ever figure it out?

    • @ledders27
      @ledders27 6 หลายเดือนก่อน

      nope still clueless@@juicymoose9693

    • @ledders27
      @ledders27 6 หลายเดือนก่อน +1

      Nope, I'm still clueless

    • @juicymoose9693
      @juicymoose9693 6 หลายเดือนก่อน

      @@ledders27 maybe someday we'll know 😔

    • @raynlaze1339
      @raynlaze1339 หลายเดือนก่อน

      I have a solution for you guys:
      1. Hit ctrl + p in vscode.
      2. Type: >Python: select interpreter and select it
      3. Click "Enter interpreter path..."
      4. Enter the path or click "Find" and browse to the path to ".venv/Scripts/python.exe" (select python.exe)
      5. check that this python.exe is now your selected interpreter, it should now work.

  • @khalilbenmeziane8836
    @khalilbenmeziane8836 ปีที่แล้ว

    i hope you do django series dave thank you

  • @laurentgaume125
    @laurentgaume125 5 หลายเดือนก่อน

    Really Great

  • @ram_qr
    @ram_qr ปีที่แล้ว

    brilliant as always

  • @mr.k8660
    @mr.k8660 หลายเดือนก่อน

    5:54

  • @clementbabili6058
    @clementbabili6058 8 หลายเดือนก่อน +1

    Anyone have an issue whereby when you run the py -m venv .venv its gives an error, if so please advise on what to do next.

    • @hussainalaa2361
      @hussainalaa2361 5 หลายเดือนก่อน

      same problem when i give the source command it errors

    • @alkfjd6313
      @alkfjd6313 2 หลายเดือนก่อน

      @@hussainalaa2361 If you're using powershell in windows. Try .\.venv\Scritps\activate

  • @roeesun6758
    @roeesun6758 4 หลายเดือนก่อน

    help when i try to activate venv using source it just says source is not recgonized anyone knows how to fix?

    • @alkfjd6313
      @alkfjd6313 2 หลายเดือนก่อน

      I got the exactly same error. I saw someone on StackOverFlow saying that source only makes sense in Linux, so you can only use source in bash terminal. But bash terminal throws a "No such file or directory" error.

  • @radman999
    @radman999 6 หลายเดือนก่อน

    What is this Windoze bullshit