I want to test more python codes with several packages. These packages are listed in deps/requirements.txt. Docker file such as
---docker file---
COPY deps/requirements.txt .
RUN grep -vE '^(#|$)' requirements.txt |
while read -r requirement; do
if ! python3.11 -m pip install --no-cache-dir "$requirement"; then
echo "$requirement" >> failed_packages.txt;
fi
done &&
if [ -s failed_packages.txt ]; then
echo "以下包安装失败:";
cat failed_packages.txt;
exit 1;
else
echo "所有包安装成功。";
fi
But when I test python codes with python3, I don't find packages. It has several errors such as 'pandas' not found etc.
Hot to fix this?
I want to test more python codes with several packages. These packages are listed in deps/requirements.txt. Docker file such as
---docker file---
COPY deps/requirements.txt .
RUN grep -vE '^(#|$)' requirements.txt |
while read -r requirement; do
if ! python3.11 -m pip install --no-cache-dir "$requirement"; then
echo "$requirement" >> failed_packages.txt;
fi
done &&
if [ -s failed_packages.txt ]; then
echo "以下包安装失败:";
cat failed_packages.txt;
exit 1;
else
echo "所有包安装成功。";
fi
But when I test python codes with python3, I don't find packages. It has several errors such as 'pandas' not found etc.
Hot to fix this?