Python Tutorial: Pipenv - Easily Manage Packages and Virtual Environments

Поділитися
Вставка
  • Опубліковано 20 жов 2024

КОМЕНТАРІ • 289

  • @LionelHamayon
    @LionelHamayon 4 роки тому +153

    Great video, very clear - thank you so much !
    0:28 pip
    0:55 venv
    2:11 Installing Pipenv & create Pipenv project by installing a package
    5:08 Pipfile and Pipfile.lock
    11:22 Activating the virtual environment / run from virtual environment
    14:55 Run scripts inside the virtual environment
    15:19 Install packages using requirements.txt
    17:21 Create requirements.txt
    18:30 Install a package only for the dev environment
    19:36 Removing a package
    20:07 Changing Python version from Pipfile
    22:07 re-creating the environment from scratch
    24:25 Check for security vulnerabilities & fix
    26:17 Dependencies graph
    26:45 Pushing to production as a deterministic environment with Pipfile.lock
    28:32 Manage environment variables

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

      Noice

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

      💖💜💙💚

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

      thank you.

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

      Thank you, most commands get like less than a second of screen time, making them almost impossible to find by browsing the preview. This list is so helpful.

  • @orangemahrt
    @orangemahrt 3 роки тому +19

    I completed cs50x with flying colors; felt so comfortable moving on; then have spent the past 3 days tearing my hair out trying to code outside of the cs50 IDE. Your videos are consistently superior in eloquence and execution and dramatically reduce barriers to entry. Thank you for caring so much about your craft and the community.

  • @teatree9279
    @teatree9279 5 років тому +5

    dislikes, how can anyone dislike such well explained videos, i mean, i have searched tutorials till my eyes bulged out. This is the best, thank youuuuuuuuuu.

  • @shritamkumarmund5273
    @shritamkumarmund5273 6 років тому +21

    We need some more Teachers like Corey and Sendex. Thanks for this tutorial.
    Love from India.
    Namaste🙏

  • @aleksandrshirokov9037
    @aleksandrshirokov9037 6 років тому +61

    Always wait for your videos. They are very powerful. Learn every playlist. You have a talent to teach. Best of luck!

  • @Fisher60
    @Fisher60 4 роки тому +25

    My god I love the fact that whenever I need to learn something new, there is already a Corey Schafer video from like 2 years ago that teaches it.

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

      this one you better not learn.

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

      @@armynyus9123 why ?

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

      @@marwenbhj8914 pipenv is dead, few dare to say it. Don't trust me, research it, then decice if you are the poetry or pip-tools type of guy.

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

      He’s so goood!

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

    Can't thank you enough for all of your videos, but today I've been looking for how to have env variables in a single project/env. Bravo good sir.

  • @sawsebauce
    @sawsebauce 4 роки тому +5

    awesome content, thanks so much. as a novice self-taught python developer, this was gold!

  • @abduldione1524
    @abduldione1524 5 років тому +5

    Corey, your a great member of society. A true teacher! I respect this video because it helped me a tons. This is one of the best videos on youtube at this moment.

  • @johnsabini3218
    @johnsabini3218 4 роки тому +5

    This is one very good pipenv walk through. I recommended it it to students. This should be taught as early as possible to all python students. I've learned from this. I was a dev who had to put large systems (Java EE ugh) into prod and it was always a fraught experience with many disparate tools and checks. I think every language should have a universal pipenv tool.

  • @yu-chenxue3460
    @yu-chenxue3460 6 років тому +7

    I've been waiting for this video for soooooo long! Very comprehensive introduction to pipenv. Wonderful video!

  • @tylerf7636
    @tylerf7636 3 місяці тому

    Sir, you kick ass. Thank you. Thank you so much. I really appreciate how you mention that it was okay to not be familiar with a lot this stuff. I’m about to finish my masters in CS and am learning how much different industry is than school. Very frustrating, but you make it easier to manage. You’re a homie.

  • @charlesbovalis6591
    @charlesbovalis6591 5 років тому +1

    Excellent video - it cleared out a lot of confusion and vagueness I had regarding virtual environments. Also it helped me clear out a major conceptual road-block I had, and that was: what was the logical relation between a virtual environment and a project. I was under the impression that a virtual enviroment can have multiple projects underneath .. but thanks to this presentation all is clear now .. Thank you again for providing such a great, short and clear tutorial ..

    • @charlesbovalis6591
      @charlesbovalis6591 5 років тому

      Actually - as I am following now your OOP video series - it just "hit" me with yet another "revelation" regarding your above course .. Since you create a Virtual environment for a project-directory - that does not necessarily mean that only one program can belong in that project folder ... ( the fact that you can invoke any program within the project structure without necessarily activating the virtual environment shell gave me that revelation ... WOW ... "lights" are finally turning "on" now .. and I feel totally liberated as I truly struggled to clear our some concepts . Please correct my thought process if necessary .. But usually - if I understood your lecture - you keep things simple , meaning one program per project / virtual environment, correct ?
      By the way, I truly love your teaching style ( clarity of voice, short and to the point ) - I will definitely contribute to your classes maybe even the monthly setup ... I am glad I have discovered you :)

  • @distracteddispatches
    @distracteddispatches 5 років тому +2

    Super helpful, concise, no wasting time like so many other videos. Very professional and appreciated!

  • @darshahlu
    @darshahlu 6 років тому +3

    Great video! Very nice explanation of the problems pipenv solves and demo of pipenv features. Regarding deployment, rather than pipenv install --ignore-pipfile, better to use pipenv install --deploy command because that one checks if your Pipfile.lock is in sync with the Pipfile; if they are out of sync, it errors.

    • @coreyms
      @coreyms  6 років тому

      Thanks! I'll keep that in mind.

  • @Lamb4139
    @Lamb4139 6 років тому +3

    Thanks Corey! I was already using pipenv but as always learned something new with your videos (.env files). You're the best!

    • @coreyms
      @coreyms  6 років тому +1

      Glad you got something out of it!

    • @AnkitKumar-yi1ir
      @AnkitKumar-yi1ir 6 років тому

      sir make videos on AI or Machine learning plz

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

    Python Pipenv deeply explained. Thank You.

  • @markbritten-jones4531
    @markbritten-jones4531 3 роки тому

    Great video! Like many of us I suspect, I had a few python installations on my machine and was unclear which version was being used and which packages were available. Now it is all crystal clear. Thank you so much!

  • @porlando12
    @porlando12 Рік тому +2

    Corey never disappoints! There's so much valuable information packed into this video!

  • @egae6782
    @egae6782 5 років тому +4

    When I will land a job I will donate for you!!! Went through Django series. Good job

  • @euclitian
    @euclitian 5 років тому +3

    Thanks man, this is like the visual version of the documentation. clear and precise.

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

    This was really amazing. Thanks, Corey. You ARE the #1 youtuber Dev!!!!!!!!

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

    I always feel happy going through your tutorial. It always gives final touch to my knowledge.

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

    Nice, well done! Really appreciate your willingness to share your knowledge and experience to all of us!

  • @ErnestGWilsonII
    @ErnestGWilsonII 6 років тому +11

    Wow! Another fantastic video from my favorite Python instructor on UA-cam! I just can't say enough good things about Corey and the awesome videos he creates and shares with all of us! There are some people that make the internet and the world a better place, so I will say what must be said... thumbs up and subscribed with notifications turned on! If I could give this channel a million thumbs up I would!

    • @coreyms
      @coreyms  6 років тому +5

      Wow, thanks. I really appreciate the kind words. It means a lot.

  • @muralimohan807
    @muralimohan807 5 років тому +2

    I never seen any one or any video tutorial like yours. You are explanation and your practical is seem less and crisp and qulity of content is too good. And you never made me to skip any one bit of sec of video . Ill give great thums up.

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

    I had a weird hesitation to try to learn virtual environments, learning anxiety. Your explanations are so simple and calming a goat would understand. And Im a dog so that's giving goats a lot of credit.

  • @dakshsagar2839
    @dakshsagar2839 6 років тому +3

    After such a long time, glad you are back !

  • @colonelkob
    @colonelkob 6 років тому +3

    Just in time!! I was going to go through the documentation tomorrow! Thanks Corey!

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

    Super clear pipenv tutorial, the best! Thank you!

  • @madusan1
    @madusan1 6 років тому

    Been using pipenv for several months now... loving it. I often use - pipenv install --update packagename {ie. django}. This obvious updates to the latest. The manual editing of the Pipfile gives more control on the version but I try to keep current for bug & security fixes.. Stay ahead of the curve. Haven't had it bite me yet... I run my test my code on the dev server and on a separate testing server (seperate inhouse box with a LEMP stack

  • @팍준하
    @팍준하 4 роки тому +5

    For any lost windows users out there, wondering "How the hell am Im gonna use it in windows cmd?",
    watch the video on how to install Windows Subsystem for Linux. Corey has a video of it in the playlist "Linux/Mac terminal tutorials", so go check that out. After having it installed, you can follow all the commands that Corey uses just fine, in windows.
    Of course, there are gonna be a few discrepancies, like python 3.6 being the default python instead of python 3.7, or 2 instead of 3. You can fix those small things later on.
    List of what's different.
    you gotta type python3 instead of python to specifically indicate python version 3
    pip3 instead of pip, to refer to pip for python3 and not that for version 2.

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

      It's also possible to install Python versions 3.7 and 3.8 in Ubuntu under the WSL, using the "deadsnakes" PPA.
      sudo add-apt-repository ppa:deadsnakes/ppa
      sudo apt install python3.7 python3.8

  • @bialcus69
    @bialcus69 5 років тому +5

    Wow, I used to create venvs manually...not anymore! THANKS!

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

    Your videos are clear, detailed and well explained! Thank you so much. Please keep making quality videos like this one :)

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

    You have a talent to teach.. THANKS

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

    great videos really showing a talent in teaching and a serious work creating these videos , this can't be more simple than that " i took my hat off to you"

  • @howardgutowitz3519
    @howardgutowitz3519 5 років тому +1

    Took me a while to find this info, maybe useful to others: if you need to generate a requirements.txt file you can do it with pipenv lock -r

  • @SilvianDragan
    @SilvianDragan 6 років тому +3

    Excellent video man. Great explanation and very thorough :)

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

    Thank you so much, this is way better than using pip and venv
    Am thinking of watching your django series, but first i need to find a flask series haha

  • @lalu225
    @lalu225 6 років тому +3

    Mega like! Very comprehensive, thank you Corey!

  • @rebelScience
    @rebelScience 5 років тому +3

    Phenomenal! As always, thanks, brother!

  • @kentvandervelden
    @kentvandervelden 6 років тому +11

    I am doing all my Python management wrong. Thanks for the video Corey, I have some installations to improve.

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

      naa, this is a myth. first one here: five-myths-about-pipenv-698c5f198e4b

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

    Bro, you're the best, thanks for sharing your knowledge, a big hug from Venezuela :D!

  • @lofi_nestt
    @lofi_nestt 6 років тому +88

    Are you going to do some docker-python series? Great video btw. :)

    • @pranaybure2651
      @pranaybure2651 6 років тому +10

      @Corey - We need the Docker-Python vlog!!

    • @kinjomusic
      @kinjomusic 6 років тому +6

      plus one for docker and maybe w kubernetes too?

    • @el9attous
      @el9attous 5 років тому +3

      docker plus kubernetes please

    • @mpgovinda
      @mpgovinda 5 років тому +3

      Please do docker, python and kubernetes, tuto

    • @a_m_dev
      @a_m_dev 5 років тому +3

      docker + kubernetes pls

  • @sriniakula7484
    @sriniakula7484 3 місяці тому +1

    Really nicely explained. Thank you

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

    Excellent describe , this helped me a lot . Please continue your great work

  • @td6564
    @td6564 6 років тому +3

    Great video. I enjoyed it. You are very thoughtful.

  • @scottwiseman2966
    @scottwiseman2966 5 років тому +2

    This is what I asked for in the last video. Did you read my mind?

  • @filipkendes1866
    @filipkendes1866 6 років тому +10

    UPLOAD MORE FREQUENTLY. YOU ARE THE BEST CHANNEL WITH PYTHON PROGRAMMING CONTENT
    Sorry for caps lock but this was very important xD

    • @coreyms
      @coreyms  6 років тому +11

      I've been busy with some travel and some work on my home (roof repairs, remodeling, etc). But I am going to be releasing much more frequently now. Working on another video right now actually. Sorry for the infrequent updates and thanks for sticking around!

    • @filipkendes1866
      @filipkendes1866 6 років тому +4

      i love you hahaha. Keep uploading this quality content and i will stick with you forever

    • @ZeCatable
      @ZeCatable 6 років тому +1

      Greetings Corey! Keep the quality while maintaining a healthy lifestyle ; this is more important!
      As a non-specialist, your videos (along with Raymond Hettinger's videos and twitts) have helped me skill up more quickly and secure a more programming-verse job.
      You help me improve my work and I cascade to my teammates (even though no UA-cam love at work). Thank you!

  • @roboroogo
    @roboroogo 5 років тому +1

    Great explanation and delivery!

  • @NemilSheriff
    @NemilSheriff 6 років тому +1

    Very comprehensive, many thanks!

  • @antonyjohne
    @antonyjohne 6 років тому +2

    Hey Corey! Amazing Work! Your videos are as simple as the code you write. Could you please make a series on Numpy and/or on its dependencies such as Pandas and Matplotlib. It would be REALLY USEFUL for people getting into Machine Learning. (Which is literally what half of the world is trying right now!)

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

    this is what am exactly looking for today. Thank you Corey. Subscribed. :)

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

    Thank you so much Corey! Your python videos are the absolutely best!

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

    Awesome and a very detailed explanation. Thank you.

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

    Clear Explanation Schafer, Better alternative for requirements.txt

  • @coolwinder
    @coolwinder 5 років тому +1

    Best video for pipenv!

  • @MU_2000
    @MU_2000 6 років тому +1

    Informative and clear for understanding! Thx!

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

    Very good video on a very important topic, for the virtual environment in Python 👍

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

    Hi Corey, Thanks for your excellent educative videos. Learning a lot from you.

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

    Thank you very much for this video :) It is really educational and comprehensive!

  • @FobazF
    @FobazF 6 років тому +6

    pipenv is indeed easy to use but I would recommend sticking with good ol' virtual env mainly because pipenv almost breaks every time with a pip update. Conda is also another great alternative which is language agnostic and allows you to install any non-Python package to the environment.

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

    this was very helpful and clear

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

    One of the clearest tutorials on pipenv. Thanks! Do you have any tutorial on deploying a simple (non-framework) python app to a VM, like Google Compute Engine?

  • @tholeduc6499
    @tholeduc6499 4 місяці тому

    Well, I almost skiped this video because it made from "5 years ago", lucky me I did not. Thanks for your work, sir.

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

    Half an hour of delicious brain food, nice served. 👍

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

    Hello Corey, are you still using Pipenv in 2021? Would you still recommend it?

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

    Excellent video and content! Thank you.

  • @wolfisraging
    @wolfisraging 6 років тому +3

    I've learned so much from u, thanks man

  • @porlando12
    @porlando12 4 місяці тому

    Would love to see you cover poetry next!

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

    The best tool ever invented;)

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

    Installed on a couple of accounts projects for python 3.7.4, 3.8.2 and 2.7.18 on the latest Fedora. The trick was being in the right project directory, so each one has it's own Pipfile. The pipenv commands seem limited. But I can now run three Python versions concurrently.

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

    Excellent Video, You are hero. I have a question, If we use docker then I think we don't need to use pipenv or venv? Am I right?

  • @aashayamballi
    @aashayamballi 5 років тому +2

    Thank you Corey :)

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

    Excellent video !!! Thanks.

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

    Fantastic video thank you very helpful

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

    First of all, your teaching style is good, and anyone grabs ur teachings easily, and thanks for teaching us. you are the best tutor I have ever come up with in python language. can u suggest any python language book, which is best to go through other than your channel? Moreover, I am a beginner to python language I thoroughly enjoyed ur videos, if u can suggest me best python book to ur sensibility and I guess it suits me and it helps me to learn further (I like physical like books). In case if u written any books related to this language can u suggest one (or) your favorite book, please......................................

  • @joelmontesdeoca6572
    @joelmontesdeoca6572 5 років тому +1

    Wonderful tutorial. I sent you 5 BATs! Enjoy!

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

    This is an amazing tutorial

  • @humanOSx
    @humanOSx 6 років тому +2

    Thanks, Corey.

  • @alexbordei3951
    @alexbordei3951 5 років тому

    Love your videos Corey, thanks for sharing. I wonder if there's a way to mark where certain sub topics are in your video. I know you recently asked in your community page if people preferred short or long videos. Having the marks in this video would help people navigate, for example if they were interested in pipenv but specifically how to implement dev features. Just a thought, but thank you!!!

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

    Thank you, you make it easy

  • @anuragreddygv323
    @anuragreddygv323 6 років тому +16

    Can you do docker and kubernetes videos as well

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

    Sh*t! @29:47 You nearly guessed my first project's super secret key! 😲

  • @portgasdace8961
    @portgasdace8961 6 років тому +2

    Good teacher really nice video :)

  • @jeffp2033
    @jeffp2033 5 років тому +2

    great tutorial!!!!!

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

    Thanks very much man

  • @Rocorama1
    @Rocorama1 5 років тому +1

    Your vid's are always so informative and it's appreciated thank you!
    I'm currently using python's 'venv', so would this be a better option to use pipenv for multiple projects?

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

    Excellent explained. :-)

  • @asadrauf7111
    @asadrauf7111 6 років тому

    Can you please do an ffmpeg video and how to do that with the help of ffmpy. I have searched the internet for it and can't seem to find anything. You, being the greatest python instructor that I know of, I have to turn to you for advice. Thanks for all of the good work.

  • @a_m_dev
    @a_m_dev 5 років тому +1

    You are Amazing ....

  • @alanefi1664
    @alanefi1664 6 років тому

    Corey-Thanks a lot for your educational videos; they are extremely informative with simple instructions to follow. I have two questions: 1) I am using anaconda and have been using conda package manager but after watching this video I want to switch to pipenv. Is it possible to install anaconda packages with pipenv? 2) Do you have separate video on how to edit terminal window the way it set up on your machine? Thanks

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

    Hi Corey, It would be great if you could do a summary video on virtualenv, pyenv, pyenv-virtualenv, virtualenvwrapper, pyenv-virtualenvwrapper, pipenv. It will be a very useful resource.

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

    this was great

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

    for who faced an issue during creating virtual enviroment upgrading virtual enviroment version may solve your issue, use the following command in cmd to upgrade it "python -m pip install --upgrade virtualenv"

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

    Muchas gracias, demasiado bueno

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

    Question about using different versions of Python (timestamp 20:23): What is the best practice of Python version installation in windows? Or does other Python versions even need to be installed before and pipenv will install missing Python version is needed.

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

    very helpful :D

  • @timburton7448
    @timburton7448 6 років тому

    Fantastic video, Corey. I recently started using Anaconda and noticed that environments can be created within it. The question is: how is Anaconda's env management system different from pipenv? Can the two be used interchangeably? And how do all the conda terminal commands fit into the picture. The documentation is confusing and incomplete. Many thanks.

  • @LuCaaZ7
    @LuCaaZ7 5 років тому

    It is a little more complicated using Linux as subsystem, but great work!