Friday, November 27, 2026

Upgrading Python version 3.10 to 3.11

I started experimenting with Python  roughly 6 years (at that time on Python 3.10.x)  but never paid a lot of attention on the Python version used in the different conda environments. 

Last weekend I however saw the first warnings about breaking changes. To play it safe, I decided to first upgrade from version 3.10 to 3.11 even though 3.11 is only supported until October 2027 (see Status of Python versions) for more information.

I decided not to use "conda update python" since that command tries to install the latest Python version that is compatible with all currently installed packages and available in your configured channels. With a lot of packages installed in the conda environments it would be a bit of random guess on which version would be eventually installed.

Instead I explictly pinned the the target version explicitly (conda install python=3.12) so that I knew exactly what version I was moving to and I also cloned the conda environment.



Afterwards I started testing the different Jupyter notebooks - some of them are available on Github  jorisp/tradingnotebooks. Below a list of things I had to fix:

  • yfinance broken since the peewee library got uninstalled - so I had to reinstall it conda install -c conda-forge peewee
  • Rewrote some of the panda resample code - since starting with pandas 2.1, the frequency alias 'M' (month-end) was deprecated and renamed to 'ME' ("Month End") to make its meaning clearer


  • Upgraded the alphavantage package to 3.0.0  and also noticed at the same time that the functionality in the free version has been cut down a lot so not really useful anymore. If you still want to see it working see https://github.com/jorisp/tradingnotebooks/blob/master/AlphaVantage%20GOOG.ipynb

I will keep on updating this post in the coming weeks and add additional info.

References: