Blindly following setup instructions

I decided to blindly follow setup instructions to simulate teaching streamlit to newbies.

Running on ubuntu 18.04, python 3 setup (3.6.x)
started terminal, following the 2 initial instructions

$ pip install streamlit

“pip not found”

so sudo installed python-pip as per recommendation

$ streamlit hello

command not found

No clue on next step or what i should have done differently

Hi @fkx.

I’m sorry you’re seeing this problem! Let’s see if we can get this sorted out for you.

Just to double check, did you run pip install streamlit after installing pip and before running streamlit run? It not, please do so and let us know if this fixes it! :heart:

If so and it’s still not working, please

  1. Run the following on the command line and send us the output:
python --version && pip --version
  1. Try importing streamlit from within Python and let us know what happens:
$ python
Python 3.6.3 (default, Dec 21 2017, 16:21:12) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import streamlit
>>> streamlit.__version__
'0.47.3'

Thank you for your patience!

Hi:

yes, i ran it first time and it seemed to go through an elaborate streamlit install with no errors

here is the output of the versions
Python 2.7.15+
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

however python3 is also installed so i installed python3-pip3
then tried the pip3 install streamlit but got the same error message “command not found”

Then tried to install from within python3 and got
$ python3
Python 3.6.8 (default, Aug 20 2019, 17:12:48)
[GCC 8.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import streamlit
streamlit.version
‘0.47.3’

glad to help by trying to blindly follow directions

Im guessing there are path issues maybe?

Here’s what happens when i type streamlit from within python3

streamlit
<module ‘streamlit’ from ‘/home/frank/.local/lib/python3.6/site-packages/streamlit/init.py’>

streamlit hello.py throws an error as well

OK I got it to work (mostly)
Here are the steps I went through to make it work.
(I am a windows person learning ubuntu 18.04 on a vanilla install, no anaconda, etc)

  1. Install python3
  2. install python3-pip
  3. install python3-venv
  4. mkdir a dir and cd into it
  5. create a virtual environment in the dir
  6. activate it
  7. install streamlit
  8. run hello

animation demo runs
plotting demo runs
mapping demo - failure to hash an object of type class ‘function’
dataframe - failure to hash an object of type class ‘function’

this is on latest version of firefox

will press on

Got to the same point on an windows 10 system

  • started new windows terminal
  • started bash
  • went through the above steps for ubuntu, installed and started streamlit hello
  • first 2 demos run, second 2 don’t with same errors (failure to hash an object …) this is on a totally different computer with a totally different OS (windows WSL)

I am a little confused about apt vs pip when reading various installation guides

Maybe streamlit can make a specific recommendation, or advise of details when using alternative pkg management?

Looking good though

Hi @fkx, thanks for doing this. Super valuable!!

This makes me think we should have a separate, more detailed installation instructions page for people who aren’t experts in working with Python packages. I’ll pass this on to our documentation team!

Regarding the errors you’re seeing on Ubuntu and Windows, we’re working on a fix for that as I write this. See https://github.com/streamlit/streamlit/issues/242 . My guess is we’ll have this in our next release.

Anyway, thanks again for documenting all your installation steps this way :pray: :100:

I’m wondering if streamlit might benefit from a docker image?

Would it solve any of the version issues?

Just asking.

mapping demo - failure to hash an object of type class ‘function’ <class ‘os._Environ’>.,

I am seeing this same error when running on Mac using VSCode, in a virtual env and using Chrome.
I had no issues on a Windows7 machine using VSCode, virtual env and Chrome as well.

I wonder if you were able to resolve your issue.

There is now a docker image here
https://cloud.docker.com/u/marcskovmadsen/repository/docker/marcskovmadsen/awesome-streamlit

For the details see.

image

I’ve deployed it to Azure https://awesome-streamlit.azurewebsites.net/

I’ve inserted a description on a docker image in a comment below. The link to the image is https://cloud.docker.com/u/marcskovmadsen/repository/docker/marcskovmadsen/awesome-streamlit

That error is related to the location of your Python environment with respect to where you’re running Streamlit from. We actually have a fix for it, which will land in the production version of Streamlit in a matter of days :smiley: