yesterday post, I created a new virtual environment named [devtf] and in this environment
I’ve installed a lot of tools that I need. Then I tried to launch a jupyter notebook
from this environment, to use this tools and, of course, it didn’t work.
It was time to read and learn how this works. So, when I finally get this I find this amazing article which really explain how this works “Using Virtual Environments in Jupyter Notebook and Python” (see references)
Jupyter Notebook makes sure that the IPython kernel is available, but you have to manually add a kernel with a different version of Python or a virtual environment. First, you need to activate your virtual environment. Next, install ipykernel which provides the IPython kernel for Jupyter. And finally, you can add your virtual environment to Jupyter.
Where “devtf” is the name of the new kernel you want to create. Now, when I launch Jupyter Notebooks, the new kernel is available to be used
When I started to use this new kernel (virtual environment) I realized that I didn’t installed TensorFlow. You know, being happy about this, naming the kernel TF but not installing the core component. And, sure, my notebooks didn’t work.
I went to my terminal / command prompt and installed TensorFlow. Then I only need to restart the Kernel, and everything start working. I added a extra couple of lines in my notebook just to check the TensorFlow and keras versions.
similar errors with another packages, so I pip installed the packages in the
terminal and restart the kernel to have the notebook OK. So, my simple reminder
for myself about how to do this!
As it turns out that I have been fortunate to participate, once again, in Interface: the podcast that my friend Rodrigo Diaz Concha manages and coordinates (link). This time, I’ve talked about one of the coolest preview products we have in Azure: Azure Notebooks.
sounds weird for a .Net Developers, however, the power, productivity, and
collaboration capabilities that Jupyter notebooks provide are something the
Python community has long taken advantage of.
I’d better leave the podcast link and hope you enjoy it (remember, is in Spanish):
Pues resulta que he tenido la suerte de participar, una vez más, en Interfaz: el podcast que dirige y coordina mi amigo Rodrigo Diaz Concha (link). En esta oportunidad, he hablado de uno de los productos en Preview que tenemos en Azure: Azure Notebooks.
Este producto suena
raro para un .Net Developers, sin embargo, la potencia, productividad y
capacidades de colaboración que proveen las Jupyter notebooks, son algo que la
comunidad de Python aprovecha desde hace tiempo.
Mejor dejo el
link del podcast y espero que lo disfruten:
Interfaz Podcast Episodio 113 – Azure Notebooks con Bruno Capuano
I’ve been using Python and Jupyter notebooks more and more. And somehow, during this learning path I also realize that I can use Visual Studio Code to code amazing Python apps, and also to edit and work with Jupyter notebooks.
If you are VSCode python developer, you may know some of the features available in the tool. I won’t describe them, because you may find the official documentation very useful (see below links or references).
The Python extension provides many features for editing Python source code
in Visual Studio Code:
However, during the part months I’ve also working a lot using Jupyter notebooks, and I was very happy when I realize that VSCode also have some cool features to work with notebooks. The core of the notebooks are cells, and we can use them with the prefix #%%.
This is how it looks inside the IDE, running a cell in the code
feature is to run notebooks in a remote Jupyter server, maybe using Azure Notebooks.
I haven’t tried this one, and it’s on my ToDo list for the near future.
On top of adding cells features into standard python [.py] files, we can also edit standard Jupyter files. I’ve installed jupyter into one of my anaconda local environments, and now I can edit files inside VSCode.
First, I’ll be prompted to import the file as a standard python file
Now I got my Jupiter notebook inside VSCode
The final step will be to export my file or debug session, and for this we have the command [Python: Export …]
Después de una noche genial con los amigos de Metro Toronto UG, llega el momento de compartir los materiales que utilice durante la sesión. La idea inicial era hablar un poco de Azure Notebooks, y de alguna manera terminamos hablando también de Cognitive Services y Custom Vision, fue genial!
Para comenzar, los 15 min con el video de la Keynote:
Y algunos de los links que utilicé durante la sesión
After an amazing event with my friends from Metro Toronto UG, it’s time to share some resources. It was initially supposed to be focused only on Azure Notebooks, but somehow we spend a lot of time talking about Cognitive Services and Custom Vision, that was great!