Error Installing Requirements - ModuleNotFoundError: No module named 'msvcrt'

I have a github repo with poetry pyproject.toml specs, It works fine in my computer (windows) but fails to launch on cloud…

I.m getting ModuleNotFoundError: No module named ‘msvcrt’ error during launch

github repo is:

https://share.streamlit.io/pablocfonseca/rasalib_cookbook/select.py

Can someone help me?

Hi @PablocFonseca -

Streamlit Cloud are launched as debian images, so Microsoft runtimes aren’t available. I suspect if you remove this section, it might work:

Best,
Randy

1 Like

Thanks Randy
I removed poetry.lock and kept only pyproject.toml as below:

[tool.poetry]
name = "rasalib_cookbook"
version = "0.1.0"
description = "Examples using Streamlit and rasalib"
authors = ["Pablo C Fonseca <p*************@gmail.com>"]

[tool.poetry.dependencies]
python = "">=3.7,<4.0""
streamlit = "^0.87.0"
rasalib = {file = "./rasalib-0.1.0-py3-none-any.whl"}
[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

The lock file is now created in linux, shouldn’t have any windows dependencies.
The problem happens when processing python requirement.

Solved By creating requirements.txt as:

streamlit==0.87.0
./rasalib-0.1.0-py3-none-any.whl
2 Likes

Glad you figured it out before I got back to you!

=)
But pyproject.toml deployment is not working as it should, maybe we should open a ticket for the devs?

Possibly? I’m not familiar enough with pyproject.toml to think through whether this is a bug or not :slight_smile: