astro-informatics / s2let

Fast wavelet transforms on the sphere.
http://astro-informatics.github.io/s2let
GNU General Public License v3.0
11 stars 2 forks source link

No remote 'conan-center' defined in remotes #39

Closed paddyroddy closed 2 years ago

paddyroddy commented 2 years ago

I'm having problems installing pys2let on Linux - seems to be working fine on mac. Related problem to https://github.com/astro-informatics/ssht/issues/54. I've tried installing the older versions but that doesn't work either.

uname -a

Linux paddy 5.11.0-7620-generic #21~1626191760~21.04~55de9c3-Ubuntu SMP Tue Jul 20 22:18:55 UTC x86_64 x86_64 x86_64 GNU/Linux

python --version

Python 3.9.6

pip install pys2let

Collecting pys2let
  Using cached pys2let-2.2.3.tar.gz (53 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy in /home/paddy/miniconda3/envs/py39/lib/python3.9/site-packages (from pys2let) (1.21.2)
Building wheels for collected packages: pys2let
  Building wheel for pys2let (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/paddy/miniconda3/envs/py39/bin/python /home/paddy/miniconda3/envs/py39/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpubqk48v1
       cwd: /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d
  Complete output (73 lines):
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 10.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d/_cmake_test_compile/build
  -- The C compiler identification is GNU 10.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Downloading conan.cmake from https://github.com/conan-io/cmake-conan
  -- Conan: checking conan executable
  -- Conan: Found program /tmp/pip-build-env-r3e9mo78/overlay/bin/conan
  -- Conan: Version found Conan version 1.40.1

  -- Conan executing: /tmp/pip-build-env-r3e9mo78/overlay/bin/conan install /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d/conanfile.txt --remote conan-center --generator cmake_find_package --generator cmake_paths --build missing --settings build_type=Release --settings compiler=gcc --settings compiler.version=10
  ERROR: No remote 'conan-center' defined in remotes
  CMake Error at _skbuild/linux-x86_64-3.9/cmake-build/conan.cmake:631 (message):
    Conan install failed='1'
  Call Stack (most recent call first):
    cmake/conan_dependencies.cmake:14 (conan_cmake_install)
    CMakeLists.txt:24 (include)

  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d/_skbuild/linux-x86_64-3.9/cmake-build/CMakeFiles/CMakeOutput.log".
    File "/tmp/pip-build-env-r3e9mo78/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 586, in setup
      env = cmkr.configure(cmake_args,
    File "/tmp/pip-build-env-r3e9mo78/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 237, in configure
      raise SKBuildError(

  --------------------------------------------------------------------------------
  -- Trying "Ninja" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja" generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d/_skbuild/linux-x86_64-3.9/cmake-build
    Command:
      cmake /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d/_skbuild/linux-x86_64-3.9/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/paddy/miniconda3/envs/py39/bin/python -DPYTHON_VERSION_STRING:STRING=3.9.6 -DPYTHON_INCLUDE_DIR:PATH=/home/paddy/miniconda3/envs/py39/include/python3.9 -DPYTHON_LIBRARY:FILEPATH=/home/paddy/miniconda3/envs/py39/lib/libpython3.9.so -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-r3e9mo78/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DBUILD_TESTING:BOOL=OFF -Dconan_deps:BOOL=ON -Dcfitsio:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE:STRING=Release

  Traceback (most recent call last):

  An error occurred while configuring with CMake.
    Command:
      cmake /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d/_skbuild/linux-x86_64-3.9/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/paddy/miniconda3/envs/py39/bin/python -DPYTHON_VERSION_STRING:STRING=3.9.6 -DPYTHON_INCLUDE_DIR:PATH=/home/paddy/miniconda3/envs/py39/include/python3.9 -DPYTHON_LIBRARY:FILEPATH=/home/paddy/miniconda3/envs/py39/lib/libpython3.9.so -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-r3e9mo78/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DBUILD_TESTING:BOOL=OFF -Dconan_deps:BOOL=ON -Dcfitsio:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d
    Working directory:
      /tmp/pip-install-a4hmhc2e/pys2let_ee61650594154aaa820c9928957d2c5d/_skbuild/linux-x86_64-3.9/cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for pys2let
Failed to build pys2let
ERROR: Could not build wheels for pys2let which use PEP 517 and cannot be installed directly
tianshu-wang commented 2 years ago

Hi, I recently faced the same problem and it was solved in the following way:

Check the remote list of Conan by typing: conan remote list. You will see all remote sites of your Conan. In my case, there was no site called "conan-center", so I had to manually add it. The command is: conan remote add conan-center https://conan.bintray.com True. The pip correctly installed s2let, ssht and other packages for me.

Hope this helps!

paddyroddy commented 2 years ago

@tianshu-wang this worked! The problem I was having was on my CI on GitHub Actions, so I've taken pyssht and pys2let out of the requirements.txt for now and separately installed conan first i.e.

            - name: Setup conda
              uses: conda-incubator/setup-miniconda@v2
              with:
                  activate-environment: py39
                  channel-priority: strict
                  environment-file: environment.yml
                  use-only-tar-bz2: true

            - name: Fix conan problems
              run: |
                pip install conan==1.40.2
                conan remote add conan-center https://conan.bintray.com True
                pip install pys2let==2.2.3 pyssht==1.5.0
jasonmcewen commented 2 years ago

Thanks for the advise @tianshu-wang.

@paddyroddy Would you recomment we make any updates about this (e.g. to documentation)? If not can we close?

paddyroddy commented 2 years ago

The fix from @tianshu-wang feels like a temporary fix to me. This only started happening recently, so I feel @mdavezac /someone needs to fix something somewhere.

From my CI runs, I know that it was working without this workaround on 5th September, and that it was broken on 14th September. Obviously something happened in the meantime.

I've not noticed this problem on Mac. My CI is on Linux, so either GitHub Actions changed in that gap or conan or something else

mdavezac commented 2 years ago

I'll try and take a look asap. Meanwhile: https://docs.conan.io/en/latest/uploading_packages/remotes.html#conan-center-deprecated vs https://docs.conan.io/en/latest/uploading_packages/remotes.html#conancenter

mdavezac commented 2 years ago

A new version pointing to conancenter should land on pypi very soon.

paddyroddy commented 2 years ago

how soon is soon? Don't see it up yet

mdavezac commented 2 years ago

Please see astro-informatics/src_flag#1. I think it should resolve your problem if you are compiling src_flag by hand.