Help with installation, please

Hi,

I’m trying to install Streamlit on a Linux distro (Solus OS / Budgie) but it’s not going smoothly.

I followed the instructions here Installation - Streamlit Docs
and got to step #2 but no further.

When I enter: python -m venv .venv
I get: Package venv not installed

But I know I tried a ‘Flaskblog’ a long time ago where I used a virtual environment so tried: python -m virtualenv .virtualenv
Same thing, Package virtualenv not installed.

When I check for virtualenv: sudo eopkg check virtualenv
I get: Checking integrity of virtualenv OK
which to me seems to indicate it’s on the laptop (or, maybe I’m incorrect).

The docs say you can use any of 5 different tools for environment management, I have one, but doesn’t seem to find it. Sure, I could just install another one, but I’m constantly bumping up against the limits of my small hard drive on my 7 year old laptop so am hesitant to just keep adding ‘additional’ software.

Thanks,
Mike

Which python version is installed?

python --version

Holy Cow!
Python 2.7.18
How can that be? I update Solus OS all the time and it’s a rolling release, out there on ‘the edge’

my IDE for Python is Thonny, it says:
Python 3.10.13 (/usr/bin/python3)

Forget about Python 2.X, you will need at least Python 3.8 to run current streamlit version…

There are ways in Linux to switch the python versions.
However, i don’t know Solus OS, seems to be a rather unusual distro, that is not based on a well known distro, therefore i cannot help with this, because i don’t want to mislead you…

Well, it’s an unbelievable distro that ‘just works’, which is why I left Ubuntu LTS’s (constant issues, annual wipe/re-installs).

I found this thread in the Solus forums asking a similar question about changing a ‘symlink’ Python version by default - Solus Forum but it sounds like that is discouraged.

I’ll jump on that thread and proceed there for help in updating to 3x.
Confusing, all these different ‘versions of python’ (system/command line, Thonny, Software Center).

Thanks.

In Linux systems you often need python3 instead of just python.

Yes, I totally forgot I read that somewhere (and, I also, do not want to be a System Administrator, but a Data Analyst)

So, when I enter in: python3 --version
Python 3.10.13

this was helpful, thanks, and probably should be in the instructions.
Also, I got to step three by using:

python3 -m virtualenv .virtualenv

instead of:

python -m virtualenv .virtualenv

(‘virtualenv’ is available on my Linux version, ‘venv’ is not)

This would be helpful for other ‘newbies’ like myself, to save 1 - 4 hours of time and improve ‘on-boarding’.

python3 -m venv .myvenvdirectory

…should work on all python versions since python 3.3 because it is part of the standard library…

1 Like

Stuck on step #3

pip install streamlit

it seems Solus does not accept this command, so am waiting for a response there

Try:

pip3 install streamlit

or

python3 -m pip install streamlit

…in your virtual environment.

1 Like

The second one worked!! I’ve got Streamlit in my browser! Huge Thanks!!!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.