Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which version of Anaconda can run “conda install -c bjodah chempy pytest” correctly #182

Open
spiderman930706 opened this issue Sep 29, 2020 · 3 comments

Comments

@spiderman930706
Copy link

spiderman930706 commented Sep 29, 2020

I tried to build the image with the dockerfile below

FROM continuumio/anaconda3:5.3.0
RUN conda install -y -c bjodah chempy pytest &&  \
    conda clean -y -all

it will downgrade the python version to 2.7

The following packages will be DOWNGRADED:

    gstreamer:                     1.14.0-hb453b48_1              --> 1.14.0-hb31296c_0      
    numpy:                         1.15.1-py37h1d66e8a_0          --> 1.9.2-py27_0           
    python:                        3.7.0-hc3d631a_0               --> 2.7.18-h15b4118_1      
    scipy:                         1.1.0-py37hfa4b5c9_1           --> 0.16.0-np19py27_0      


Downloading and Extracting Packages
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

Traceback (most recent call last):
  File "/opt/conda/bin/conda", line 7, in <module>
    from conda.cli import main
ImportError: No module named conda.cli
The command '/bin/sh -c conda install -y -c bjodah chempy pytest &&      conda clean -y -all' returned a non-zero code: 1

then I change the base image

FROM continuumio/anaconda3:latest
RUN conda install -y -c bjodah chempy pytest &&  \
    conda clean -y -all

also fail

Step 1/2 : FROM continuumio/anaconda3:latest
 ---> 472a925c4385
Step 2/2 : RUN conda install -y -c bjodah chempy pytest &&      conda clean -y -all
 ---> Running in 58f5bbc542f4
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
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:

  - chempy -> python[version='2.7.*|3.5.*|3.6.*|3.4.*']

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 pyparsing conflicts for:
pytest -> packaging -> pyparsing[version='>=2.0.2']
chempy -> pyparsing[version='>=2.0.3']

The command '/bin/sh -c conda install -y -c bjodah chempy pytest &&      conda clean -y -all' returned a non-zero code: 1

I've also tried using the dockerfile in './scripts/environment/Dockerfile', but after build the image, it can't run "python3 -m pip install chempy[all]" correctly ,There are several error like this

  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vku0voi6/pykinsol/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vku0voi6/pykinsol/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-p9d_6em1
       cwd: /tmp/pip-install-vku0voi6/pykinsol/
  Complete output (66 lines):
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  /tmp/tmpi_wq0ceh/compiler_test_source.cpp:4:8: error: #error "INFO: Sundials 3+ was not configured to use lapack"
       #  error "INFO: Sundials 3+ was not configured to use lapack"
          ^~~~~
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  /tmp/tmpbphvu9ui/compiler_test_source.cpp:4:10: error: #error "INFO: KLU was not enabled for this sundials build"
           #error "INFO: KLU was not enabled for this sundials build"
            ^~~~~
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  /tmp/tmpt3680vk4/compiler_test_source.cpp:3:26: error: #error INFO: SUNDIALS_INT32_T is not defined
                           #error INFO: SUNDIALS_INT32_T is not defined
                            ^~~~~
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  creating build/lib.linux-x86_64-3.5/pykinsol
  copying pykinsol/core.py -> build/lib.linux-x86_64-3.5/pykinsol
  copying pykinsol/_util.py -> build/lib.linux-x86_64-3.5/pykinsol
  copying pykinsol/_config.py -> build/lib.linux-x86_64-3.5/pykinsol
  copying pykinsol/__init__.py -> build/lib.linux-x86_64-3.5/pykinsol
  copying pykinsol/_release.py -> build/lib.linux-x86_64-3.5/pykinsol
  creating build/lib.linux-x86_64-3.5/pykinsol/tests
  copying pykinsol/tests/test_kinsol_numpy.py -> build/lib.linux-x86_64-3.5/pykinsol/tests
  copying pykinsol/tests/__init__.py -> build/lib.linux-x86_64-3.5/pykinsol/tests
  running egg_info
  writing dependency_links to pykinsol.egg-info/dependency_links.txt
  writing requirements to pykinsol.egg-info/requires.txt
  writing pykinsol.egg-info/PKG-INFO
  writing top-level names to pykinsol.egg-info/top_level.txt
  reading manifest file 'pykinsol.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'pykinsol.egg-info/SOURCES.txt'
  copying pykinsol/_kinsol_numpy.cpp -> build/lib.linux-x86_64-3.5/pykinsol
  copying pykinsol/_kinsol_numpy.pyx -> build/lib.linux-x86_64-3.5/pykinsol
  creating build/lib.linux-x86_64-3.5/pykinsol/include
  copying pykinsol/include/kinsol_cxx.hpp -> build/lib.linux-x86_64-3.5/pykinsol/include
  copying pykinsol/include/kinsol_numpy.hpp -> build/lib.linux-x86_64-3.5/pykinsol/include
  copying pykinsol/include/kinsol_numpy.pxd -> build/lib.linux-x86_64-3.5/pykinsol/include
  copying pykinsol/include/sundials_cxx.hpp -> build/lib.linux-x86_64-3.5/pykinsol/include
  running build_ext
  building 'pykinsol._kinsol_numpy' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/pykinsol
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-wzfkdC/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYKINSOL_NO_KLU=1 -DPYKINSOL_NO_LAPACK=1 -I/usr/local/lib/python3.5/dist-packages/numpy/core/include -Ipykinsol/include -I/usr/include/python3.5m -c pykinsol/_kinsol_numpy.cpp -o build/temp.linux-x86_64-3.5/pykinsol/_kinsol_numpy.o -DVERSION_INFO="0.1.5" --std=c++11
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                   from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from pykinsol/_kinsol_numpy.cpp:631:
  /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  In file included from pykinsol/include/kinsol_numpy.hpp:8:0,
                   from pykinsol/_kinsol_numpy.cpp:638:
  pykinsol/include/kinsol_cxx.hpp: In member function ‘void kinsol_cxx::Solver::set_linear_solver_to_dense(int)’:
  pykinsol/include/kinsol_cxx.hpp:298:44: error: ‘SUNLapackDense’ was not declared in this scope
                   LS_ = SUNLapackDense(y_, A_);
                                              ^
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pykinsol
@bjodah
Copy link
Owner

bjodah commented Sep 29, 2020

Hi @spiderman930706,
First of all, thank you for reporting this. It's currently a known issue, there is an ongoing effort to add ChemPy to conda-forge, which would ensure that it is continuously integrated with the wider conda ecosystem. Here is the pull-request over at conda-forge/staged-recipes:
conda-forge/staged-recipes#12678

You can see that @ProfLeao has come quite close to getting it working, however, there is some spurious errors left to be resolved (you can click the logs for the failed runs over there). If you have any idea what might be going on there, please let us know.

@bjodah
Copy link
Owner

bjodah commented Nov 24, 2020

Currently tests are passing in this PR. Since I rarely use conda, any interest in shared maintainership of these recipes is most appreciated, feel free to ping over there.

@ProfLeao
Copy link

Dear @spiderman930706 and @bjodah , I will do new checks next week. I apologize for the delay, however, other tasks have demanded more time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants