As a general rule, please try to avoid mixing conda and pip. It may not be much of an issue in this case, but i've been in datascience courses where the instructor did that... and later on it turns out conda can't keep track of the dependencies for things installed by pip and if you accidentally end up updating packages with conda, it breaks your environment.
Can I install pytorch with pip and install the packages with conda only? My conda gets stuck in the "Solving Environment" stage for eternity, it installs so much easier with pytorch.
You always post at the perfect times Tim! Wanted to add for anyone that is having issues with python/conda --version. Make sure to restart your CMD shell before running those. After installing VS Code, it says, "Add to PATH (requires shell restart)" so I assume that would've been the same case for the CMD. After intalling conda/python I received the error (can't find python or conda even though the where command worked perfectly), and after double checking my environments, I saw they were properly added to PATH. I just needed to restart my CMD.
Thank you so much for explaining this, I've been struggling all week to understand environments and just got even more confused, this has helped greatly.
At 8:00, you mention using pip to install modules into your Anaconda environment. This is not recommended. You should be using conda install within an Anaconda environment.
I wish you would've talked more about why not pycharm. It does everything you have set up in video and I have yet to encounter any problems with it. It creates venv for every project, has auto completion, lots of extensions, formats code on save too, has terminal and package manager, tools for db, i mean it's a full package and does a great job at that. And it's also free.
Surprised to not see pipenv for the virtual environment section. It's great because it handles the dependencies for you (aka it'll install numpy when you install pandas because pandas needs numpy to work)
For better or worse, Anaconda started charging large commercial users (>200 employees using the package managers) $15/user/month and lot of corporate users had to stop using it in their professional life. I don't think the charge is unwarranted given the convenience Anaconda has delivered to the data science community, but also medium sized corporations that look at software as a Cost Center don't like getting slapped with a new huge bill out of nowhere for something there are 'free' alternatives for (literally venv ships with python). Anywhoo. this is the can of worms that comes up anytime people do Dev Environment demos' (venv, poetry, conda, etc.)
I don't like Anaconda as it messes with the system quite a bit. I prefer Pipenv for the virtual environment and Pyenv to manage multiple Python versions.
5:00 How can you install packages into a “wrong” version if you are using virtual environment? Also, recommending anaconda just because you “used it for a long time” without at least explaining venv (which is built-in)…
when i put "conda activate " it tells me to run "conda init" before, but when i do i just keeps repeating to run it before. what is happening? what do i do?
im using vs code on windows...when i change the interpreter version and run 'python --version' it always returns the base version no matter what the interpreter selected....example...in my Virtual env i have 3.10.12...but it returns base version 3.11.5....what could be the reason can you help pls? im having issues with installing opencv library...it always return could not build wheels
So if you are at base env, then running 'conda activate newenv' does apparently not change the interpreter in VScode. For example I have the interpreters "Python 3.11.4 ('general': conda)" and "Python 3.11.4 ('base': conda)" installed. At start, only the base interpreter is chosen in VScode and at the bottom right corner I can see "Python 3.11.4 ('general': conda)", so all is well. Now, when I go 'conda activate general' it changes the environment but the text at the bottom right corner is still "Python 3.11.4 ('general': conda)". Do I always need to also manually change the interpreter when I programmatically change the environment in conda?
After I added Anaconda to system path, my anaconda prompt started to have problem upgrading its conda version. I solved it by removing anaconda to system path so I am not sure adding that is a good idea or not (I used windows)
When making these videos, do not say "on Linux, probably a similar thing". If you don't use Linux, then ask a friend what that "similar thing" would be. Then say it in your video. Otherwise, an extremely good video.
Super annoying, I’m basically brand new to coding, I’m trying to set up my anaconda to python version 3.11 but apparently it’s just failing to find any packages needed for that, it did 3.9 super easy for obvious reasons, so am I correct in assuming anaconda doesn’t have support yet for 3.11?
I'm 64 years old, and I'm glad to see a young guy like yourself passionate about computers. I was fortunate, that just when I was leaving the Air Force, the PC craze was just starting, so that I was able to get in on the ground floor. Unfortunately, I made my living through other trades. I freely admit, I don't pick up concepts as fast as I used to, and you have pretty compact, and very efficient way of communicating. However, you seemed to have left a big hole in the Anaconda concept by not explaining thoroughly how to add a different version of Python in a virtual environment. I tried your suggested conda create --name programmingexpert python=3.10 method, and it didn't work. So, I watched another RUclips video and learned that it can be done by a much simpler, and more generic way of conda search python, for all of the newer, and older versions Python. Then, there are channels that Anaconda can use, such as conda search -c conda-forge python. I'm wondering, if that's what you meant: conda search -c programmingexpert python?
I had to go back one revision. I have 3.11 installed but I could only create a conda env with 3.10...which wasn't installed. He did the same in the video where he had 3.10 installed but installed conda for v3.9
"'conda' is not recognized as an internal or external command, operable program or batch file." I just installed it so I am not sure what is wrong. Someone to help ?
Why are we using conda? just to create a virtual environment? the commands to do so using venv are quite simple. is there some other reason to use conda? i only ask because conda is not activating the environment for me currently. it keeps saying, "CondaError: Run 'conda init' before 'conda activate' ". When I run "conda init" it says "No action taken" so the result is I cannot activate the created environment using conda. Do you know how to fix this conda issue? Thanks.
so every time you load your program to work on it, you need to manually set python interpreter..every single time? if that's the case, that's kinda lame.
I have a problem with this formatting, having the same dict as you, mine is formatted to be in 1 line. How to make it format like in your video? I'm using black formatter.
As always, I love your vids but at 13:25 the command should be ">conda activate robert" you can look in the down right corner that the enviroment didn't change. Sorry I couldn't help myself with that.
I’m here because I want to start learning Python. I’m already lost. Is there some other video/ step I should watch/ learn before this? Complete novice here. Any information would be greatly appreciated.
Thanks, this was a great video. I do have two questions about anaconda and virtual environments. Is there a recommended way to version control the virtual environments you've created in anaconda? At work I RDP into a server that multiple have access to and use python on, our virtual environments just use venv and are scattered around. Anaconda seems like the ideal solution to centralize, but I'd be worried about people accidentally updating/deleting environments. Second question, for some reason, when installing anaconda on a new machine for all users (in ProgramData) the option to add conda to the PATH was greyed out and disabled so I couldn't select it. Not sure why that is. (Edit, actually I was able to add it to the PATH afterwards manually, I thought it might not work cause the option was disabled)
One quibble: VS Code will NOT list 'every interpreter'. It studiously ignores pre-Python 3 - it 'finds' envs that use a pre-Python3 interpreter, and then removes them from the display as you watch. So anyone whose code base includes projects written in Python 2.7 (say) is outta luck - if you want to use VS Code, you've got to refactor everything. For anyone who had been writing Python of any complexity for ten years, this involves refactoring literally tens of thousands of lines of code. (Just the 'print' statements FFS). Or... just don't install VS Code: 'free' is costly if it doesn't do the most basic job. *inb4* "Python 2.7 is no longer maintained" - so what? There are tens of thousands of code-bases across the globe that are written in the compsci equivalent of Etruscan - and _those_ have to be maintained. VS Code is typical Microsoft dreck: a bewildering array of 'features' that most users will never use, and guaranteed to let the user down when it matters.
Looking to learn Web 3 and Blockchain development? Check out my new course: algoexpert.io/blockchain - use code "tim" for a discount!
How can I check my Python code step by step like in VBA?
this is exactly what i needed to start development after getting stuck in fancies for 12 hours, big up, keep the good work.
As a general rule, please try to avoid mixing conda and pip. It may not be much of an issue in this case, but i've been in datascience courses where the instructor did that... and later on it turns out conda can't keep track of the dependencies for things installed by pip and if you accidentally end up updating packages with conda, it breaks your environment.
Came here to say this.
Can I install pytorch with pip and install the packages with conda only? My conda gets stuck in the "Solving Environment" stage for eternity, it installs so much easier with pytorch.
Why not just using the elegant pyenv? It takes care of pip, dependencies, python version
Exactly what i needed to get into python development after couple of years. Thanks Tim
You always post at the perfect times Tim!
Wanted to add for anyone that is having issues with python/conda --version. Make sure to restart your CMD shell before running those. After installing VS Code, it says, "Add to PATH (requires shell restart)" so I assume that would've been the same case for the CMD. After intalling conda/python I received the error (can't find python or conda even though the where command worked perfectly), and after double checking my environments, I saw they were properly added to PATH. I just needed to restart my CMD.
haha wish I saw this comment before I spent ages confused lol
Much needed video, as I'm starting my data science journey, and I'm looking for complete setup from conda to vs code.
Thank you so much for explaining this, I've been struggling all week to understand environments and just got even more confused, this has helped greatly.
This was indeed very useful. Made all the environment variables stuff easier to understand and finally being able to run python within command prompt
Thank you for making this video, i am learning from it and appriciate your work.
At 8:00, you mention using pip to install modules into your Anaconda environment. This is not recommended. You should be using conda install within an Anaconda environment.
Very good tutorial... your choosing
VS code is a gode idea because every language (almost) are supported in
VS code...
hey @TechWithTim, Thank you for your video, It help me solve my env issue.
Perfect instructions for what I've been looking for. Thanks.
Following Your Videos From Basics 😌❤️
Anaconda is dedicated for data science. All python programmers do not do data related tasks. Also, the installation size is huge for no reason.
you have other options... he is showing his own environment. I personally use poetry.
I wish you would've talked more about why not pycharm. It does everything you have set up in video and I have yet to encounter any problems with it. It creates venv for every project, has auto completion, lots of extensions, formats code on save too, has terminal and package manager, tools for db, i mean it's a full package and does a great job at that. And it's also free.
What made you choose Anaconda for env management over something like pipenv?
Thanks brother anaconda stuff help me alot i am a beginner thank you
Great content although I did find the comments even more useful. Great community.
I use virtualenv to create virtual environments and it works just fine. Even though I have conda installed.
Surprised to not see pipenv for the virtual environment section. It's great because it handles the dependencies for you (aka it'll install numpy when you install pandas because pandas needs numpy to work)
Agree, I think that poetry with pyenv is the best option rather than pipenv or conda
Thank you very much for this Tutorial!
Finally I learn what Anaconda is for...
For better or worse, Anaconda started charging large commercial users (>200 employees using the package managers) $15/user/month and lot of corporate users had to stop using it in their professional life. I don't think the charge is unwarranted given the convenience Anaconda has delivered to the data science community, but also medium sized corporations that look at software as a Cost Center don't like getting slapped with a new huge bill out of nowhere for something there are 'free' alternatives for (literally venv ships with python). Anywhoo. this is the can of worms that comes up anytime people do Dev Environment demos' (venv, poetry, conda, etc.)
I also use Python Indent
Nice Videos Love Your Videos👍👍👍👍
Thank you so much 😀
I don't like Anaconda as it messes with the system quite a bit. I prefer Pipenv for the virtual environment and Pyenv to manage multiple Python versions.
youre a godsend
great good luck Tim!
How to deploy Python project with anaconda?
should we add to path for vscode
When I type "conda" into cmd my terminal just freezes and doesn't return anything. I added conda to path what am I doing wrong?
Pretty clear thnk u🎉
5:00 How can you install packages into a “wrong” version if you are using virtual environment?
Also, recommending anaconda just because you “used it for a long time” without at least explaining venv (which is built-in)…
when i put "conda activate " it tells me to run "conda init" before, but when i do i just keeps repeating to run it before. what is happening? what do i do?
Tim, I have a small question "did you attend any undergraduate universities"?
im using vs code on windows...when i change the interpreter version and run 'python --version' it always returns the base version no matter what the interpreter selected....example...in my Virtual env i have 3.10.12...but it returns base version 3.11.5....what could be the reason can you help pls?
im having issues with installing opencv library...it always return could not build wheels
Do I need multiple versions of python? If so, how do I add them?
what theme do you use?
there is a free version of tabnine also
which color theme is he using?
So if you are at base env, then running 'conda activate newenv' does apparently not change the interpreter in VScode. For example I have the interpreters "Python 3.11.4 ('general': conda)" and "Python 3.11.4 ('base': conda)" installed. At start, only the base interpreter is chosen in VScode and at the bottom right corner I can see "Python 3.11.4 ('general': conda)", so all is well. Now, when I go 'conda activate general' it changes the environment but the text at the bottom right corner is still "Python 3.11.4 ('general': conda)". Do I always need to also manually change the interpreter when I programmatically change the environment in conda?
please use cmd. The powershell has issues
what theme he using?
After I added Anaconda to system path, my anaconda prompt started to have problem upgrading its conda version. I solved it by removing anaconda to system path so I am not sure adding that is a good idea or not (I used windows)
Run Anaconda prompt as administrator.
What are your thoughts on anaconda vs poetry?
I prefer anaconda, just what im used to
how can i make conda(base) as not default while opening a new terminal
as you formulated the question, I marked it pulled it in a new tab and got beautiful answers. Thanks for question
When making these videos, do not say "on Linux, probably a similar thing". If you don't use Linux, then ask a friend what that "similar thing" would be. Then say it in your video.
Otherwise, an extremely good video.
Super annoying, I’m basically brand new to coding, I’m trying to set up my anaconda to python version 3.11 but apparently it’s just failing to find any packages needed for that, it did 3.9 super easy for obvious reasons, so am I correct in assuming anaconda doesn’t have support yet for 3.11?
Python 3.11 released last month. Most of the python packages are not compatible with 3.11 now. Wait 2-3 months more.
VS code is good but it's too laggy for slow computers. I'd prefer sublime.
Black formatter just puts spaces in for me, it won't put things onto new lines like your dictionary did
20 dollars a month for autocomplete???
Second
❤❤❤❤❤🎉
conda OUT
poetry IN
Can someone in youtube world, anyone, concoct some new way of presenting "advertisers", supporters or whatever word you choose to represent them.
First
"VEN V." hahahaha, venv = virtual environment
most powerful ide for python is pycharm, vs code sucks
anotherone thinks windows is standart....
VSCode? Seriously?
Pycharm is better!
I have a better answer "use poetry"
I'm 64 years old, and I'm glad to see a young guy like yourself passionate about computers. I was fortunate, that just when I was leaving the Air Force, the PC craze was just starting, so that I was able to get in on the ground floor. Unfortunately, I made my living through other trades. I freely admit, I don't pick up concepts as fast as I used to, and you have pretty compact, and very efficient way of communicating. However, you seemed to have left a big hole in the Anaconda concept by not explaining thoroughly how to add a different version of Python in a virtual environment. I tried your suggested conda create --name programmingexpert python=3.10 method, and it didn't work. So, I watched another RUclips video and learned that it can be done by a much simpler, and more generic way of conda search python, for all of the newer, and older versions Python. Then, there are channels that Anaconda can use, such as conda search -c conda-forge python. I'm wondering, if that's what you meant: conda search -c programmingexpert python?
I had to go back one revision. I have 3.11 installed but I could only create a conda env with 3.10...which wasn't installed. He did the same in the video where he had 3.10 installed but installed conda for v3.9
Linux is missing in your development environment ;)
Great overview, but Anaconda is too heavy.....
what did pyCharm do to you? seems like a very good idea. Why is vscode better than it?
Great useful video, thanks Tim.
What do you think about poetry for creating python packages?
Very good video! covered all questions I had for using VScode for python! Thanks Tim!
"'conda' is not recognized as an internal or external command,
operable program or batch file."
I just installed it so I am not sure what is wrong. Someone to help ?
I think you have to add it to your path
Omg I'm relearning python (last time I used it was 6 years ago) and this has been so helpful. Thank you!
Emacs ?
Why are we using conda? just to create a virtual environment? the commands to do so using venv are quite simple. is there some other reason to use conda? i only ask because conda is not activating the environment for me currently. it keeps saying, "CondaError: Run 'conda init' before 'conda activate' ". When I run "conda init" it says "No action taken" so the result is I cannot activate the created environment using conda. Do you know how to fix this conda issue? Thanks.
For some reason, I can't access aklearn, even though it has been installed in my environment
so every time you load your program to work on it, you need to manually set python interpreter..every single time? if that's the case, that's kinda lame.
It's pronounced as Jinja not Jenga 😂
😂
I have a problem with this formatting, having the same dict as you, mine is formatted to be in 1 line. How to make it format like in your video? I'm using black formatter.
I don’t find windows comfortable…
As always, I love your vids but at 13:25 the command should be ">conda activate robert" you can look in the down right corner that the enviroment didn't change. Sorry I couldn't help myself with that.
Uninstalling anaconda, for pycham
Perfect introduction. Thank you!
Is this really the best way?
You're an absolute legend
I’m here because I want to start learning Python. I’m already lost. Is there some other video/ step I should watch/ learn before this? Complete novice here. Any information would be greatly appreciated.
I'd recommend PyCharm CE (free) for a beginner.
Thank you!
first
Super helpful -- thanks for sharing this with us, Tim!
Can you add environments using miniconda?
Miniconda is Anaconda less ALL the packages for data science. Everything else works exactly the same.
Thanks, this was a great video. I do have two questions about anaconda and virtual environments.
Is there a recommended way to version control the virtual environments you've created in anaconda? At work I RDP into a server that multiple have access to and use python on, our virtual environments just use venv and are scattered around. Anaconda seems like the ideal solution to centralize, but I'd be worried about people accidentally updating/deleting environments.
Second question, for some reason, when installing anaconda on a new machine for all users (in ProgramData) the option to add conda to the PATH was greyed out and disabled so I couldn't select it. Not sure why that is. (Edit, actually I was able to add it to the PATH afterwards manually, I thought it might not work cause the option was disabled)
One quibble: VS Code will NOT list 'every interpreter'. It studiously ignores pre-Python 3 - it 'finds' envs that use a pre-Python3 interpreter, and then removes them from the display as you watch.
So anyone whose code base includes projects written in Python 2.7 (say) is outta luck - if you want to use VS Code, you've got to refactor everything.
For anyone who had been writing Python of any complexity for ten years, this involves refactoring literally tens of thousands of lines of code. (Just the 'print' statements FFS). Or... just don't install VS Code: 'free' is costly if it doesn't do the most basic job.
*inb4* "Python 2.7 is no longer maintained" - so what? There are tens of thousands of code-bases across the globe that are written in the compsci equivalent of Etruscan - and _those_ have to be maintained.
VS Code is typical Microsoft dreck: a bewildering array of 'features' that most users will never use, and guaranteed to let the user down when it matters.
Desperately trying not to use expletives, but these instructions are incomplete