Getting Started With Jupyter

Hey, wannabe python coder here that needs help getting started with Jupyter. I’m running Ubuntu Budgie 22.04 on a workstation.

I was introduced to python through the OpenBBTerminal Project. I’ve installed Miniconda and OpenBBTerminal and it runs just fine. After using it for a bit, I decided I wanted to try a few projects in Python. I installed the full version of Anaconda, upon which my computer crashed a few times. I then removed Anaconda, following their directions, and it completely wiped out my home directory. Then did a clean install and restored my home directory from a backup (swearing never to use Anaconda again).

I re-installed Miniconda and OpenBBTerminal, followed by the install of Jupyter, Pandas, yfinance, and tried some simple code. It didn’t work, and I looks like it can’t find the yfinance module, even tho it works fine for OpenBBTerminal. I also tried loading it in the code, and that did not work either. Image attached that shows the code and error.

Any suggestions would be appreciated!

How did you install jupyter and yfinance, and how are you running jupyter?


I installed Jupyter from the Ubuntu Software app and yfinance with “pip install yfinance”.

I’m running Jupyter by selecting it from the software menu.

OK, how did you install pip?

What’s probably going on here is that you have multiple versions of python installed, and jupyter is using one of them while pip is using another. Therefore, jupyter can’t find packages installed by pip.

You mentioned using miniconda. Where does it enter into your workflow?

1 Like

Hi Alexander, thank you for your assistance. pip was installed from the command line. As mentioned, I installed miniconda when I started using OpenBBTerminal. The only time I recall using it is “conda activate gst”, which activates the environment I use for OpenBBTerminal. As far as the new attempt to use Jupyter, I don’t recall using conda in that process. What you mention makes sense, I will see if Python exists in multiple places.

Did a quick check. I have only installed the latest version of Miniconda and OpenBBTerminal since the recent crash. But in the Miniconda folder, I see folders labelled Python, Python2, Python 2.7, Python3, Python 3.6, Python3.7, Python3.8 and Python3.9. The only version I installed was 3.9.

Python folders do not occur anywhere else in the system.

OK, I found a solution…things are working. I uninstalled Jupyter Notebook using the Ubuntu Software repository, since I installed it from there. I uninstalled yfinance, since I had installed it with pip.

Then I installed Jupyter Lab with “conda install jupyterlab -c conda-forge”. Ran it from command line and it started up in a new browser window. Output in the terminal indicated it loaded Python 3.9 from the miniconda directory, and the JupyterLab extension as well.

Then I ran my previous code, and viola! It worked. Thank you Alexander, for giving me some hints and making me think critically about the process/workflow.

1 Like