r/learnpython • u/sleuth-sister • Sep 12 '26
jupyter notebook is kicking my ahh
I'm a 28yo student learning data science and AI through an online graduation degree course. Ngl I did Not realize this would be as difficult as it is proving to be.
I am unable to even do a project 5% (stuck in the titanic dataset) because all the time goes into setting up a venv for my notebook and then solving every single problem that comes up while doing that.
Can someone here help me with some videos or tutorials that kind of help me understand how virtual environments, and installing pandas and numpys and everything for those separately even if you have those installed on your system and everything works?
I'm tired of solving problems as they arise without knowing the basics of it all.
Also any help with how to get ahead of this all will help, I'm scared and really want to improve!
7
u/TurtleFetus Sep 12 '26
Highly recommend Real Python guides. This one should set on the right course! https://realpython.com/python-virtual-environments-a-primer/
1
u/seriousgourmetshit Sep 12 '26
Your what
1
u/dean_hunter7 Sep 12 '26
use thonny.
1
u/FoolsSeldom Sep 12 '26
Virtual Environments
Given the thousands of packages (libraries, frameworks, etc) out there, you can see that if you are working on several different projects, you can end up installing a vast range of different packages, only a few of which will be used for any particular project.
This is where Python virtual environments come in. Not to be confused with virtual machines. Typically created on a project-by-project basis. Install only the packages required for a project. This helps avoid conflicts between packages, especially version complications.
Most popular code editors and IDEs, including Microsoft's VS Code and JetBrains' PyCharm, offer built-in features to help to start off new projects and create and activate Python virtual environments.
You can create a new Python virtual environment from your operating system command line environment using,
for Windows,
or, for macOS / Linux,
Note:
venvis a command and.venvis a folder name. You can use any valid folder name instead but this is a common convention.That creates a new folder in the current working directory called
.venv.You then activate using, for Windows,
or, for macOS / Linux,
the command
deactivatefor any platform will deactivate the virtual environment and return you to using the base environment.Installing packages
Once you've created and activated a Python virtual environment, you can just use the
pip somethingcommand to install a package, assuming it is in the Pypi respository.GIT
Latest commit on default branch
Specific branch, tag, or commit
If the package lives in a subdirectory of the repo
Private repo (SSH, assuming your key is set up)
LOCAL
Regular install — copies the package into site-packages
Editable/development install — symlinks back to your source, so changes take effect immediately without reinstalling
From the project's own directory
For more information on virtual environments:
Multiple Python versions
In addition to the above, you might want to explore using
pyenv(pyenv-winfor Windows) oruv(recommended), which will let you install and use different versions of Python including alternative implementations from the reference CPython. This can be done independently of any system installed Python.1
u/darkskyexplorer24 Oct 15 '26
The reason they use jupyter notebook is it is easy to use and not the entire program needs to be re-run. Also setting up IDEs are difficult that browser based notebooks.
However I still feel these courses are outdated. Titanic dataset is very foundational and to start with project.
I would recommend you install anaconda installation and package .. and it takes care of rest of the virtual environments as then all you have to do is create a new virtual environment without wiring a single line of code.
Also , it is bit tricky at first but once you have figured out, you can easily create and manage on your own.
The structure of course is to make sure you understand different virtual environments and managing them.
Usually even us in to corporates, we deal with various projects at same time and every projects have dependencies5.
-1
u/Aromatic_Fact8656 Sep 12 '26
Hey mate, I also am not a huge fan of Jupyter. I had done a few Coursera courses that use it and I used to do all the problems using Pycharm then when I was happy load that code in to Jupyter. Might help in your case?
0
u/[deleted] Sep 12 '26
[deleted] — view deleted comment