Understanding Virtual Environments for Data Science / Data Analysis - P.4

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

КОМЕНТАРІ • 98

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

    Best 20 mins spent all day! Thanks Luke, you managed to make it crystall clear.

  • @daniloamchagas
    @daniloamchagas 3 роки тому +11

    Great explanation, man! I've been watching some of your videos and they're great! Very informative and with a simple approach. Congratulations for your good work!

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

      Heck yeah! 🙌🏼🤙🏼 Thanks for the kind words Danilo, they are much appreciated! Comments like these keep me pumping out more content!

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

      @Aditya Wagh Thanks my dude! Just trying to keep it interesting!!
      Def appreciate the suggested topics. Let me see what I can do for ya, hope I can make it happen this year! Stay tuned!

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

    Thank you not nerding out too hard in the explanations. I just want to get started! I can learn the rest later. Bless you

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

    This is great. I was getting confuse between venv and conda. You helped me a lot. Thanks.

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

    well explained, i understand fully now, why we need virtual envrionment, great

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

    Systematically amazing video.. I've been watching and practicing every single step (from installing anaconda). I will continue watch this video tomorrow. I am new to python. So I will savour my moment of learning it. Once again, thank you!!

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

      This is awesome to hear!! Keep up the hard work Bagaskoro!!

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

      @@LukeBarousse thanks.. really appreciate it

  • @Vanderposh
    @Vanderposh Рік тому +1

    Luuuuuuke ❤I am revisiting these videos after initially watching them a couple of years ago when they first came out, and it’s still one of the best tutorials! You have made everything so accessible and easy to grasp. Your videos are excellent supplementary side information I am using as a graduate student in data science program 🎉

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

      Heck yeah! Glad that you are getting use out of these videos still!

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

    thank you best video I've seen so far to explain why and how to set up virtual environment

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

    Luke, this series is so awesome. Been trying to figure out how best to setup anaconda and virtual environments and this is by far the clearest and best guide. I just had two quick Qs: 1) in your terminal and the .py files stuff pops up so you can autocomplete what you are typing; how do I set that up? 2) My terminal is the power shell whereas yours has the environment in parentheses and the dollar sign at the end; how do I get that setup? Thanks again for these amazing videos!

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

      Mac, thanks for the kind words! So glad that this tutorial has been helpful for you!
      1) For the autocomplete I installed an add-in that does this and is specific to the mac terminals, since you are using Powershell I found this option, but there may be better options: dev.to/ofhouse/add-a-bash-like-autocomplete-to-your-powershell-4257
      2) This is a custom ZSH theme that is specific to mac (& linux) terminals (theme: PowerLevel10K). For powershell you'll need to set up powerline (which is a similar theme) to customize how the terminal looks (You won't be able to get it exactly the same as mine, but you can customize to pretty close). Here is a link & vid on how to set this up: docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup

  • @Alex-gw6pm
    @Alex-gw6pm Рік тому +1

    Very great job!! Thanks a lot for your content, very useful and detailed explanation 👍🏻👍🏻👍🏻👍🏻

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

    This video series was a great help, very much appreciated!

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

      Awe thanks Anthony! I appreciate it!

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

    Thanks Luke, this really helped me in installing statsmodels library into python and VS code env. Now I understand how to work efficiently in VS Code

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

      Heck yeah, so glad this tutorial helped Msizi!

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

    I wish I could like it multiple times!!!

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

    Wow! Great explanation!

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

    Wow. The explanation is very clear !! Thanks.

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

    Awesome explanation

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

    Great work, thanks

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

    Fantastic! Keep pumping out more content!

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

      More to come, Mohamed! Thanks 🙌🏼

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

    clearly in the topics will have, also, this is what I want! Thanks.

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

      I like 2a part, nice

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

      Thanks for the kind words! Glad you enjoyed!!

  • @Digital-Light
    @Digital-Light Рік тому

    i loved this video , thank you!

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

    Very neat explanation, subscribed!

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

    Amazing work Luke. All you videos have excellent explanation with perfect visualization. Keep on going (y)

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

      Alexandre, thanks so much for this!! I'm glad you found this helpful! More to come!🤙🏼

  • @003kazimehrabrashid4
    @003kazimehrabrashid4 2 роки тому

    The way you talk and your visualization is simply awesome. The only confusion that i got is do i need to create virtual environment for every code that i am gonna write? What if I didn't create any virtual environment and got into this issue , will it be fixable then ?

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

      Thank you! And you should make an environment for every project. One project may have multiple python files that can use the same environment. But if i'm changes projects I create a new environment.

  • @Heczky
    @Heczky 8 місяців тому

    After activating venv2, don't we need to change Python interpreter too?
    I mean, for running venv2, interpreter for 3.6.12 (venv1) was enough, it seems, just asking if it could be a problem in som cases..
    Anyway thanks for great explanation, I'm actually deciding between pip and conda, which could be better, but I will probably go for conda as I plan to advance from Data Engineering to Data Analytics in a fee months..
    Good luck Luke!

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

    Great video - super helpful! But I'm unable to see the version of python running, and info about which virtual envt I'm in, can anyone please help?

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

    great series !!! 👍👍👍

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

    That was a lot of help! Thanks a lot!!

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

    Can we conclude that Virtual enviroment is like writing latex file(tex) with all the package used called or listed in the top of the file. So for virtual enviorment we install all the particular package version require for that file?

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

    Thanks

  • @Chilunem
    @Chilunem 2 місяці тому

    when I try to install numpy it doesn't work it says conda is not defined what do I do
    @Luke

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

    hey Luke, I'm learning datascience but stuck with some sandbox online env in browser. Turicreate needs python 3.7, i created env with pip, conda, pipx but while installing turicreate it return with error "upgrade pip or problem with package.
    Please make tutorial for that, much appreciated

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

    Hey Luke. You did great job on putting yourself on python starters' shoes. The series is just awesome. Thank you so much.
    Just one question: at 15:50 you said we need to restart the VS Code so that we're able to select the new installed virtual environment. But you didn't restart from the creation of "ven2", just needed to "conda activate venv2" in the command line (the Python interpreter still remains "venv1" at the left down conner).
    So it's important to select environment in the command line. Why do we even bother about the Python interpreter of VS Code at the left down conner?

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

      So that restart thing has been fixed... you don't need to restart anymore to select the environment for the jupyter notebook... For the command line, you never needed to restart

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

    guys ... i have a problenm i alr install the numpy module but when i run it says no module found but when i install it again it says the module has been downloaded ..what shoul i do?

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

      It sounds like you aren't in the right environment

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

      @@LukeBarousse if i use conda/anaconda, maybe i should'nt download the python languange? Or its not the problem?

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

      @@flaykaz I don't think that's the problem. Its the environment your terminal is in. You have to make sure you activated the environment.

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

      @@LukeBarousse is it conda activated venv1 ? I alr use it and nothing happened...idk but urs seem kinda diff u have the smth like (base1) or (venv1). Mine doesnt like that and i wonder why?

  • @needtorename6425
    @needtorename6425 23 дні тому

    can I use a single Work environment for more than one projects ?

    • @needtorename6425
      @needtorename6425 23 дні тому

      So every project must have separate Virtual Environment? to avoid any problem in future

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

    Anaconda never works on my machine, exhausted all the troubleshooting. Would you please recommend an alternative? Thanks

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

      Really?! That's very strange, I've never had issues like this before. I'd go with using pip then; it's just as good

  • @003kazimehrabrashid4
    @003kazimehrabrashid4 2 роки тому

    So the thing is as long as i am not updating any module in pip or conda, it should be working fine in global environment without creating any virtual environment. am i right?

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

      Yes, for very simple python scripts that you will never have to use again... but I highly recommend creating environments as it will save you when you come back to run a python script years from now and you have the correct environment ready to go

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

    Great Job Luke. I've been following this playlist and so far its going great. Just one ques though, math code works fine. But, numpy is not working for me. when I tried installing it the output came 'already installed'

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

      Hey Pratham, thanks for following along and for the kind words! Regarding the file, I didn't show this part but I created the file_1.py and saved it to my desktop. You can create the file a number of different ways. I recommend using the terminal: 1) Navigate into the folder where you want to save the file (cd Desktop) 2. Create the file (touch file_1.py)

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

      @@LukeBarousse Thanks for the quick response. I tried following your instructions but terminal responds- "SyntaxError: invalid syntax"

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

      raise AttributeError("module {!r} has no attribute "
      AttributeError: module 'numpy' has no attribute 'arrange'

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

      @@prathamsethi9892 What terminal are you using? if mac, all you need to do is open terminal, type "cd Desktop" then "touch file_1.py"
      the numpy error is very strange, I'm not sure how you are getting that.

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

    Hi Luke. I'm a beginner in this world of programming languages and Data World and your videos are helping me a lot! but i'm having a huge troubles with the virtual environments . I did every single step you did in your videos of installing python, anaconda and VS code. everything seems to be perfect. I write the code to create the new environment and it runs well but... when I try to activate it does nothing. literally nothing. Don't put error, does not activate it and I don't know what to do now

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

      I've never experienced this issue before. What terminal are you running this in?

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

      ​@@LukeBarousse Vs code shows me by default automatic, the powershell terminal, I have tried there and it does not work and the same error in the python terminal. I don't know if there is a conda terminal that I should open and how to open it, could it be that?

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

    Hi Luke, when I try to run Python in the cmd I get the message: "This Python interpreter is in a conda environment, but the environment has
    not been activated. Libraries may fail to load.". I'm not exactly sure what this means or how to fix this.

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

      The error message tells you that the Python interpreter from the Conda environment was found, but that 'conda activate ' has not been called. So you need to activate the enviornment

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

      @@LukeBarousse Thanks Luke, do you have to activate this each time you open and? I didn't see you do this in the video.

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

    Hey Luke, great videos
    My Terminal looks different than yours (did the same as you regarding installation etc.) but you terminal says 2:python, whereas i can only choose powershell og cmd, how do i get the same option as you, for instance my terminal doesn't show which virtual environment i am in if i use Powershell or if it is cmd it shows which virtual environment but i can't use clear for example.
    Is there anyway i can make it like yours?
    Kind regards
    Jens

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

      It's a little bitter harder as I think you are on a Windows machine. You won't beable to do exactly the same as me. Here is an article that may be a good start: medium.com/@hjgraca/style-your-windows-terminal-and-wsl2-like-a-pro-9a2e1ad4c9d0

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

      @@LukeBarousse Ah of course, I will definitely read through your link, it looks promising. Thank you for a quick answer and for making great content!

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

      @@jenstoftknudsen8407 Thanks so much Jens!

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

    Can we not write ( say in the comments) in the beginning of the code itself the list of packages with their versions we used when created and ran the code successfully. This way if we transfer this our friend or say a teacher to 50 students, then can use this list in anytime in future to create the specific virtual env to run that code. Am I talking correct here? Or is there any other way to manage this?

    • @LukeBarousse
      @LukeBarousse  Рік тому +1

      Thats a great question, there actually is a more common way to manage this.
      In python projects, you can recored the versions of your packages to a 'requirements.txt' file. Conda or pip as code to do this. Then if someone loads your code on their computer they just use the requirements.txt file to load the required versions of the packages when creating their virtual environment on their computer! It's actually a pretty cool concept

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

    Hey Luke please give me a solution for this, I am using Windows 10
    from numpy.core._multiarray_umath import (
    ImportError: DLL load failed: The specified module could not be found.

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

      I don't think I have enough details. Have you tried googling your answer to see if something pops up?

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

    Hello Luke, I am new to programing and want to expand my knowledge. I have followed your previous vids and installed everything correctly. Until this vid. My terminal looks different as you are using a mac. In the previous vids you showed how to do both platforms. Can you please explain how to do it for win 10. I would try to install "conda instal numpy==/1.17" with no luck in the python terminal. the terminal I am using doesn't generate the "$" symbol for me or have the different colors. Thanks for the help.

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

      Hey Eddie, you don't need to worry about the $ symbol. Thats just the standard symbol on the mac. Let me see what I can do for a windows tutorial, but overall the command should be the same

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

      @@LukeBarousse thanks, I'll post a pic of the message I am receiving tomorrow morning central time.

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

    Hi everybody, i have already installed numpy but keep me saying " ModuleNotFoundError: No module named 'numpy' " , if I go to "Run" then "Run without debugging" work just fine .I don't know why

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

      Hey Pablo, it sounds like you are not in the correct environment for your jupyter notebook. You need to change the environment to be in the same one that you installed numpy.

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

    Hi, I asked a question on another post, but then I came here. So, I downloaded anaconda on my Mac, but do I need to add a conda extension to my VS code?

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

      Hi Zakeya, the only extension that is required is the python one I point out in the next video (p.5). There is a conda extension but it is not necessary. Let me know if you have any other questions!

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

      @@LukeBarousse Thank you for your prompt response. I truly appreciate it. I am new to this, so my questions could be basic. The thing is that when I follow the steps in this video and reach the part where I have to install numpy it gives me this error: bash: conda: command not found

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

      @@zakeyaalsada616 No problem! To help troubleshoot, are you using Mac or WIndows? The problem is that the "conda" command was not added to be used in your Terminal/Command Prompt. For windows, if during the Anaconda setup you didn't select to add "conda" to path this would cause this.

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

    I never understood what the -m option does in: 'python -m venv my_virtualbox'

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

    The blue popup information you create is very distracting. Otherwise a great video!

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

      Good to know! I didn't realize this.. so thanks for sharing this!

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

    like

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

    Great video, thanks