coincubellc / coincube

A Python/Vue.js crypto portfolio management and trade automation program with support for 10 exchanges.
MIT License
94 stars 29 forks source link

Flask issue #6

Open maynardpa opened 3 years ago

maynardpa commented 3 years ago

Hi, when building in docker on Mac, I get the following error. I have installed Python3 and PIP via homebrew. Also note that I haven't generated a vault seed as it was optional in the install instructions. (maybe that is the main root cause)

Collecting flask-user==0.6.17 Downloading Flask-User-0.6.17.tar.gz (62 kB) ERROR: Command errored out with exit status 1: command: /opt/conda/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u1q79rq3/flask-user_dae01a91109d481f9b47d3f4148660ac/setup.py'"'"'; file='"'"'/tmp/pip-install-u1q79rq3/flask-user_dae01a91109d481f9b47d3f4148660ac/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-h23y36ni cwd: /tmp/pip-install-u1q79rq3/flask-user_dae01a91109d481f9b47d3f4148660ac/ Complete output (13 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-u1q79rq3/flask-user_dae01a91109d481f9b47d3f4148660ac/setup.py", line 5, in from flask_user import version as flask_user_version File "/tmp/pip-install-u1q79rq3/flask-user_dae01a91109d481f9b47d3f4148660ac/flask_user/init.py", line 13, in from . import forms File "/tmp/pip-install-u1q79rq3/flask-user_dae01a91109d481f9b47d3f4148660ac/flask_user/forms.py", line 71, in class AddEmailForm(FlaskForm): File "/tmp/pip-install-u1q79rq3/flask-user_dae01a91109d481f9b47d3f4148660ac/flaskuser/forms.py", line 74, in AddEmailForm validators.Email(('Invalid Email')), File "/opt/conda/lib/python3.8/site-packages/wtforms/validators.py", line 332, in init raise Exception("Install 'email_validator' for email validation support.") Exception: Install 'email_validator' for email validation support.

WARNING: Discarding https://files.pythonhosted.org/packages/64/67/1310c6062e114fb7619602d14e76fbcea5f338d6214c2cc2011f492f4e9e/Flask-User-0.6.17.tar.gz#sha256=2bdf0021810f69f9ee11c7586ce970519d8dd8ac46df3573f59f8d3ec352f4ac (from https://pypi.org/simple/flask-user/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement flask-user==0.6.17 ERROR: No matching distribution found for flask-user==0.6.17 ERROR: Service 'flask' failed to build : The command '/bin/sh -c pip install -r /back-end/requirements.txt' returned a non-zero code: 1

maynardpa commented 3 years ago

Updated the requirements file locally to flask-user==0.6.21 (that is the latest available in the 0.6.* versions) and it seems to go further when running docker-compose build.

maynardpa commented 3 years ago

And further Python version issues...

Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.

Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:

Specifications:

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package libstdcxx-ng conflicts for: python=3.8 -> libffi[version='>=3.2.1,<3.3.0a0'] -> libstdcxx-ng[version='>=4.9|>=7.2.0'] python=3.8 -> libstdcxx-ng[version='>=7.3.0|>=7.5.0|>=9.3.0']

Package libgcc-ng conflicts for: python=3.8 -> zlib[version='>=1.2.11,<1.3.0a0'] -> libgcc-ng[version='>=4.9|>=7.2.0'] python=3.8 -> libgcc-ng[version='>=7.3.0|>=7.5.0|>=9.3.0']

Package python_abi conflicts for: pyomo -> python_abi[version='2.7.|3.6|3.6.|3.7.|3.8.|3.9.|3.7',build='_cp27mu|_cp36m|_cp38|_cp37m|_cp39|_pypy37_pp73|_pypy36_pp73'] pyomo.extras -> dill -> python_abi[version='2.7.|3.6.|3.6|3.8.|3.7.|3.9.|3.7',build='_cp27mu|_cp36m|_cp38|_pypy36_pp73|_cp37m|_cp39|_pypy37_pp73']

Package zlib conflicts for: pyomo.extras -> matplotlib -> zlib[version='1.2.|1.2.11|>=1.2.11,<1.3.0a0|1.2.8|1.2.11.'] ipopt -> scotch[version='>=6.0.8,<6.0.9.0a0'] -> zlib[version='1.2.|>=1.2.11,<1.3.0a0'] python=3.8 -> zlib[version='>=1.2.11,<1.3.0a0'] pyomo -> python[version='>=3.7,<3.8.0a0'] -> zlib[version='1.2.|1.2.11|>=1.2.11,<1.3.0a0|1.2.8|1.2.11.*']

Package _openmp_mutex conflicts for: ipopt -> libgcc-ng[version='>=9.3.0'] -> _openmp_mutex[version='>=4.5'] pyomo -> libgcc-ng[version='>=9.3.0'] -> _openmp_mutex[version='>=4.5'] python=3.8 -> libgcc-ng[version='>=9.3.0'] -> _openmp_mutex[version='>=4.5']

Package libgfortran4 conflicts for: ipopt -> libgfortran4[version='>=7.5.0'] ipopt -> libgfortran-ng -> libgfortran4=7.5.0

Package openblas conflicts for: ipopt -> libblas[version='>=3.8.0,<4.0a0'] -> openblas[version='0.2.18|0.2.18.|0.3.5.|>=0.3.6,<0.3.7.0a0'] ipopt -> openblas[version='0.2.19|0.2.19.|0.2.20|0.2.20.|>=0.2.20,<0.2.21.0a0|>=0.3.3,<0.3.4.0a0']

Package libblas conflicts for: ipopt -> liblapack[version='>=3.8.0,<4.0a0'] -> libblas[version='3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0.|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.8.0|3.9.0|3.9.0|3.9.0|3.9.0|3.9.0.',build='4_openblas|4_mkl|5_openblas|5_mkl|7_openblas|7_mkl|8_openblas|8_mkl|9_openblas|10_mkl|11_openblas|14_mkl|15_openblas|16_openblas|16_mkl|17_openblas|20_mkl|21_mkl|0_openblas|2_openblas|4_mkl|5_mkl|6_mkl|7_mkl|8_mkl|8_openblas|7_openblas|6_openblas|5_openblas|4_openblas|3_openblas|1_openblas|19_mkl|18_mkl|15_mkl|14_openblas|13_openblas|13_mkl|12_mkl|12_openblas|11_mkl|10_openblas|9_mkl|6_mkl|6_openblas'] ipopt -> libblas[version='>=3.8.0,<4.0a0']

Package blas conflicts for: ipopt -> openblas[version='>=0.3.3,<0.3.4.0a0'] -> blas==1.0=openblas ipopt -> blas==1.1=openblas

Package libgfortran-ng conflicts for: ipopt -> libgfortran-ng[version='>=7,<8.0a0'] ipopt -> ampl-mp[version='>=3.1.0,<3.2.0a0'] -> libgfortran-ng[version='>=4.9']

Package libgfortran5 conflicts for: ipopt -> libgfortran5[version='>=9.3.0'] ipopt -> libgfortran-ng -> libgfortran5[version='8.4.0.|9.3.0.']

Package libopenblas conflicts for: pyomo.extras -> numpy -> libopenblas[version='>=0.2.20,<0.2.21.0a0|>=0.3.2,<0.3.3.0a0|>=0.3.3,<1.0a0'] ipopt -> libblas[version='>=3.8.0,<4.0a0'] -> libopenblas[version='0.3.3|0.3.3|0.3.3|>=0.3.10,<0.3.11.0a0|>=0.3.12,<0.3.13.0a0|>=0.3.12,<1.0a0|>=0.3.10,<1.0a0|>=0.3.9,<0.3.10.0a0|>=0.3.9,<1.0a0|>=0.3.8,<0.3.9.0a0|>=0.3.8,<1.0a0|>=0.3.7,<0.3.8.0a0|>=0.3.7,<1.0a0|>=0.3.6,<0.3.7.0a0|>=0.3.6,<1.0a0|>=0.2.20,<0.2.21.0a0',build='h5a2b251_1|h5a2b251_3|h5a2b251_2']

ERROR: Service 'trader' failed to build : The command '/bin/sh -c conda install -c conda-forge pyomo pyomo.extras ipopt' returned a non-zero code: 1

TheSkyScraper commented 3 years ago

To solve the Flask issue I edited the back/back-end/requirements.txt by replacing "flask-user==0.6.17" with just "flask-user" and it cleared up all the first errors.

Then I got the same pyomo.extras ipopt error you did:

"Specifications:

pyomo.extras -> python[version='2.7.|3.5.|3.6.|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.4.']

Your python: python=3.8"

I haven't resolved that one yet, but I have a Peppermint Linux virtual machine with python version 3.7.3 and conda 4.7.10 so I'm going to try and build it on there since that conda uses python 3.6-3.7. Hopefully that will get it done!

Did you get yours resolved?

javimurcia commented 3 years ago

I have solved it by editing back/trade-engine/Dockerfile

Change the 2 first lines to: FROM continuumio/miniconda3:4.7.12 RUN apt-get update --allow-releaseinfo-change && apt-get install -y build-essential redis-tools

Explanation:

After those 2 changes, the build process finishes with no errors.

TheSkyScraper commented 2 years ago

I have solved it by editing back/trade-engine/Dockerfile

Change the 2 first lines to: FROM continuumio/miniconda3:4.7.12 RUN apt-get update --allow-releaseinfo-change && apt-get install -y build-essential redis-tools

Explanation:

* First line (the line begining with FROM) pinned a version using python 3.7

* Second line (the line begining with RUN) added the option --allow-releaseinfo-change since that image was debian stable when it was launched, and now its oldstable. That switch prevents said condition to throw an error.

After those 2 changes, the build process finishes with no errors.

Hi Javimurcia, the first line worked but the second line failed. Do you have any ideas? Here's what I got:

=> [ 1/13] FROM docker.io/continuumio/miniconda3 0.0s => ERROR [ 2/13] RUN apt-get update && apt-get install -y build-essential redis-tools default-libmysqlcli 2.0s


[ 2/13] RUN apt-get update && apt-get install -y build-essential redis-tools default-libmysqlclient-dev:

5 0.763 Get:1 http://deb.debian.org/debian buster InRelease [122 kB]

5 0.763 Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]

5 0.995 Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]

5 1.294 Reading package lists...

5 1.964 E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

5 1.964 E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

5 1.964 E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'


executor failed running [/bin/sh -c apt-get update && apt-get install -y build-essential redis-tools default-libmysqlclient-dev]: exit code: 100 ERROR: Service 'flask' failed to build : Build failed