Installing a PyPI package for notebook use on chromeOS

I’ve got a chromebook and followed some simple directions from a YouTube video to install jupyter notebook on it. I even ended up with a convenient icon to click to activate it. If I only wanted to use notebook out of the can I have what I need. But, what I want to do now is to install and use a package I’ve found on PyPI within notebook. I have tried setting up a virtual environment, and using pip to install the PyPI package, but without success. I was able to do this on a windows computer running chrome. I am confused by it all. I would appreciate a document that would guide me through the correct procedures.

I won’t say it is the best, but a few months ago I wrote detailed steps here for installing a package on Anaconda Cloud. In your case, I’d suggest substituting the package rich because it is more straightforward than the one involved there; rich will work the way I describe there because it is on conda-forge channel as shown here. You should be able to test it using suggestions here.

Anaconda Cloud as a place to practice is nice because you won’t touch your system at all, and so there is no chance you’ll cause more problems for yourself.

Before you try that though, you may want to first wade in trying stuff without necessarily fussing around with environments yet…
Another place to practice without chancing to mess up your own system is on MyBinder-served sessions. See under the section ‘Package management on the MyBinder-served Jupyter sessions’ here for getting started. (You’ll probably need parts above, but that section covers an initial package installing approach.) That covers %pip install, but because it is already a temporary session, you don’t need to be concerned with the environment and can install like I state. If you want to use the more capable %conda install, you can use that in the session. Example, run %conda install conda-forge::rich -y in a notebook in a fresh session launched from here via the launch binder badge. (Or if you want a more modern interface, use the launch binder badge here.) Then after it completes, restart the kernel and run import rich or the command !python -m rich. Unfortunately, you cannot really explore easily environment making there, but it gives you a sense of installing and using without any chance of causing issues on your own machine. The magic install commands I suggest insure the installs occur in the proper environment where the kernel is running so that it is a bit easier.

These two suggestions of places to work are also nice because they introduce you to additional places you probably can work with your chromebook.