Closed tschaffter closed 3 years ago
The failing command can be reduce to pip install uwsgi
in this conda environment:
$ python --version
Python 3.8.5
$ conda list
# packages in environment at /home/tschaffter/.conda/envs/tox:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
appdirs 1.4.4 pypi_0 pypi
ca-certificates 2020.10.14 0
certifi 2020.11.8 py38h06a4308_0
chardet 3.0.4 pypi_0 pypi
connexion 2.7.0 pypi_0 pypi
distlib 0.3.1 pypi_0 pypi
filelock 3.0.12 pypi_0 pypi
idna 2.10 pypi_0 pypi
ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20191231 h14c3975_1
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libstdcxx-ng 9.1.0 hdf63c60_0
mongoengine 0.21.0 pypi_0 pypi
ncurses 6.2 he6710b0_1
openssl 1.1.1h h7b6447c_0
packaging 20.7 pypi_0 pypi
pip 20.2.4 py38h06a4308_0
pluggy 0.13.1 pypi_0 pypi
psycopg2-binary 2.8.6 pypi_0 pypi
py 1.9.0 pypi_0 pypi
pymongo 3.11.1 pypi_0 pypi
pyparsing 2.4.7 pypi_0 pypi
python 3.8.5 h7579374_1
readline 8.0 h7b6447c_0
requests 2.25.0 pypi_0 pypi
setuptools 50.3.1 py38h06a4308_1
sqlite 3.33.0 h62c20be_0
swagger-ui-bundle 0.0.8 pypi_0 pypi
tk 8.6.10 hbc83047_0
toml 0.10.2 pypi_0 pypi
tox 3.20.1 pypi_0 pypi
urllib3 1.26.2 pypi_0 pypi
virtualenv 20.2.1 pypi_0 pypi
wheel 0.35.1 pyhd3eb1b0_0
xz 5.2.5 h7b6447c_0
zlib 1.2.11 h7b6447c_3
A solution seems to install a lower version of gcc, which I don't want to do: https://www.programmersought.com/article/24454048850/
In the past I've used the following command to install uwsgi using conda:
conda install -c conda-forge uwsgi
After running the above command, pip install uwsgi works
:
$ pip install uwsgi
Requirement already satisfied: uwsgi in /home/tschaffter/.conda/envs/tox/lib/python3.8/site-packages (2.0.19.1)
However ideally I don't want to have to install uwsgi using conda because the CI/CD workflow does not use conda. The CI workflow currently fails to run tox
because tox
create a virtualenvironment for py38
(see tox.ini
) where uwsgi
can not be installed.
I decided to remove uwsgi
from requirements.txt and instead install it as part of the Dockerfile. Leaving uwsgi
, used only for production deployment, would lead to too much confusion to the developer using conda, which we promote. If running uwsgi locally is required when using conda, it should be installed with conda install -c conda-forge uwsgi
and not using pip install uwsgi
.
Running
pip install -r requirements.txt
fails when running in a conda environment.When the CI workflow runs (without using conda),
pip install -r requirements.txt
works.