Trouble installing streamlit on new system

I’m having trouble installing streamlit on a new system.

One thing I noticed is that it requires python 3.6 - 3.8. Does that mean python version 3.8.2 is not acceptable?

The error message is long but seems to have something to do with numpy. I’ve installed both pandas and numpy using pip3.

Any suggestions?? I can post the (long) error message if needed.

Thanks very much.

No. Any version in the 3.6.x - 3.8.x range will work. So the error has nothing to do with you using 3.8.2 vs 3.8(.0).

Please feel free to post the error log here.

Best,
Randy

The full version of the error message exceeds the character maximum by a longshot when I include the complete ouput. Here is the initial message:

ERROR: Command errored out with exit status 1:
command: /Users/sunlandtws/Coding/Watson/.venv/bin/python3 /Users/sunlandtws/Coding/Watson/.venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/bg/n7y83vwn6yl6dztf9kx478zm0000gn/T/pip-build-env-cer0ry66/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i Simple index – setuptools wheel ‘Cython>=0.29.21,<3’ ‘numpy==1.16.5; python_version==’"’"‘3.7’"’"’ and platform_system!=’"’"‘AIX’"’"’’ ‘numpy==1.17.3; python_version==’"’"‘3.8’"’"’ and platform_system!=’"’"‘AIX’"’"’’ ‘numpy==1.16.5; python_version==’"’"‘3.7’"’"’ and platform_system==’"’"‘AIX’"’"’’ ‘numpy==1.17.3; python_version==’"’"‘3.8’"’"’ and platform_system==’"’"‘AIX’"’"’’ ‘numpy; python_version>=’"’"‘3.9’"’"’’
cwd: None
Complete output (4451 lines):

Anything in there that helps?

No, it doesn’t. You could use something like a Github gist to save the entire file, then post the link here

Randy - I appreciate you sticking with me! Here is a link to the gist…

Thanks

This looks like you’re on a Mac, and what it’s trying to do is compile something but you don’t have the developer tools installed.

Have you installed XCode on your computer? If I’m not mistaken, you can install them by running xcode-select --install or a similar command in your terminal.

Best,
Randy

Just to be clear, I am using terminal through Visual Studio Code. I need to install XCode as well?

Yes, they all run through the same system dependencies. From inside the VSCode terminal or using the Terminal program itself shouldn’t matter.

Randy - When I run “xcode-select --install” it tells me its already installed:

xcode-select: error: command line tools are already installed, use “Software Update” to install updates

I then checked to see what updates are available, using “softwareupdate --list” and it says no software updates are available.

Any ideas? Could it have to do with the virtual environment I’m using?

Thank you

I assume this is a new M1 Mac?

I just tried on my M1 Mac Mini, and was able to generate a similar bit of errors, which appear to be due to our use of pyarrow as a dependency. The good news/bad news is that I use conda almost everywhere, and Streamlit does install properly using that:

conda create -n stenv python=3.8 -y
conda activate stenv
conda install -c conda-forge streamlit

I believe that the issue has to do something with pyarrow not supporting M1 Macs until Python 3.9; there was some error with Python 3.8, pyarrow and pip and I don’t know if the issue was unsolvable or what, and I think they just moved forward. So the interim solution is to use conda, Streamlit probably works with Python 3.9 also. So if you want to keep using venv, you could also try installing Python 3.9 first and seeing if that fixes it.

Hope one of those options helps!

Best,
Randy

1 Like

Thanks for the help and yes, it is a new M1 Mac mini. I’ll try these options.

Much appreciated

1 Like

I ended up installing python 3.9 with homebrew and my streamlit app seems to be functioning… thanks again.