Код: Выделить всё
/usr/bin/python3: No module named streamlit
Код: Выделить всё
{
"build": {"dockerfile": "Dockerfile"},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
},
"forwardPorts": [8501],
"runArgs": ["--env-file",".devcontainer/devcontainer.env"]
}
}
Код: Выделить всё
FROM python:3.10-bullseye
COPY requirements.txt ./requirements.txt
RUN pip install oscrypto@git+https://github.com/wbond/oscrypto.git@d5f3437ed24257895ae1edd9e503cfb352e635a8
# COPY src ./src
# WORKDIR /src
RUN pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH=/workspaces/my_project/src
EXPOSE 8001
CMD ["streamlit", "run", "view/frontend/main.py"]
Код: Выделить всё
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"env": {"PYTHONPATH": "${workspaceFolder}/src"}
},
{
"name": "Python:Streamlit",
"type": "debugpy",
"request": "launch",
"module": "streamlit",
"args": [
"run",
"${file}",
"--server.port",
"8501",
"--server.fileWatcherType",
"poll",
"--server.address",
"0.0.0.0"
],
"cwd": "${workspaceFolder}/src",
"env": {
"PYTHONPATH": "${workspaceFolder}/src",
"PYTHONHOME": "/usr/local/bin"
}
}
]
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... -even-when