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

pip install ocean-lib not working on M1, coincurve error #887

Closed
smejak opened this issue Jul 26, 2022 · 12 comments
Closed

pip install ocean-lib not working on M1, coincurve error #887

smejak opened this issue Jul 26, 2022 · 12 comments
Labels
Type: Bug Something isn't working

Comments

@smejak
Copy link

smejak commented Jul 26, 2022

Describe the bug
The newest version of ocean-lib is not installing correctly (on M1 Mac).

I followed the installation described in the main README, (started with wheel, no errors, then ocean-lib).

running

pip install wheel
pip install --pre ocean-lib

throws this error:

Collecting base58
  Using cached base58-2.1.1-py3-none-any.whl (5.6 kB)
Building wheels for collected packages: coincurve
  Building wheel for coincurve (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for coincurve (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [68 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-38
      creating build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/_windows_libsecp256k1.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/flags.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/__init__.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/keys.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/types.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/context.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/utils.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/ecdsa.py -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      copying coincurve/py.typed -> build/lib.macosx-11.0-arm64-cpython-38/coincurve
      running build_clib
      /private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-install-cwcgtxj4/coincurve_d253ec3e991a49e6965de219c367e821/libsecp256k1/autogen.sh: line 3: autoreconf: command not found
      Traceback (most recent call last):
        File "/Users/jakub/miniconda3/envs/ocean-test/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/Users/jakub/miniconda3/envs/ocean-test/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/jakub/miniconda3/envs/ocean-test/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 244, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
          self.run_setup()
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 281, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(code, locals())
        File "<string>", line 260, in <module>
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 177, in setup
          return run_commands(dist)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 193, in run_commands
          dist.run_commands()
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "<string>", line 95, in run
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/command/build.py", line 24, in run
          super().run()
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-build-env-oz111gih/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "<string>", line 152, in run
        File "/Users/jakub/miniconda3/envs/ocean-test/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/private/var/folders/vc/5b_s57r96czcz93nfrdkmhwc0000gn/T/pip-install-cwcgtxj4/coincurve_d253ec3e991a49e6965de219c367e821/libsecp256k1/autogen.sh']' returned non-zero exit status 127.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for coincurve
Failed to build coincurve
ERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects

same result when running ARCHFLAGS="-arch x86_64" pip install ocean-lib

To Reproduce
Steps to reproduce the behavior:

  1. run conda create -n ocean-test -c conda-forge python=3.8
  2. run pip install wheel
  3. run pip install --pre ocean-lib OR ARCHFLAGS="-arch x86_64" pip install ocean-lib OR pip install ocean-lib
  4. Note: behavior observed on M1 Mac

Expected behavior
Ocean.py installs without error.

Desktop (please complete the following information):

  • OS: macOS 12.3 (M1)
  • Browser: N/A

Additional context
Add any other context about the problem here.

@smejak smejak added the Type: Bug Something isn't working label Jul 26, 2022
@calina-c
Copy link
Contributor

I tried reproducing this on my Mac but the installation went smoothly. @md00ux any ideas?

@smejak
Copy link
Author

smejak commented Aug 7, 2022

@ofek Thank you. Do you know how I can specify a flag for coincurve when I'm installing ocean-lib? Running pip install ocean-lib -target arm64-apple-macos11 throws an error

ERROR: Could not find a version that satisfies the requirement arm64-apple-macos11 (from versions: none)

Also, manually installing coincurve actually works for me, the error only appears when I try installing ocean-lib.

@LoznianuAnamaria
Copy link
Contributor

@smejak Are you still encountering this problem?

@smejak
Copy link
Author

smejak commented Aug 11, 2022

Hi @AnaLoznianu. Yes, I still cannot install ocean-lib on my computer, but I have been able to install it in a Docker container that I've been using for development.

@LoznianuAnamaria
Copy link
Contributor

Thanks for the update! @miquelcabot I remember you encountered a similar issue 🤔 Can you jump in and offer guidance please?

@miquelcabot
Copy link

@AnaLoznianu @smejak I have reviewed this problem, and the similar issue was with the barge repository, because Docker don't have an elastic-search image for M1 chipsets. The error was:

Pulling elasticsearch (elasticsearch:6.8.3)...
6.8.3: Pulling from library/elasticsearch
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries

Finally this was solved in Barge v4. This version uses elasticsearch version 7.14.2, which has support for linux/arm64 platform.

@smejak It's a weird issue, because I also use @oceanprotocol/lib library in a M1 Mac and it works fine for me.

@calina-c
Copy link
Contributor

@smejak are you still encountering this issue? Do you think we can close this issue?

I've had some trouble reinstalling coincurve on a fresh Ubuntu Jammy, but I fixed it by installing and upgrading pip and wheel, then with pip install coincurve --no-binary all. I think I also had to install some OS dependencies like libtool and autoconf, but otherwise it went ok.

@LoznianuAnamaria
Copy link
Contributor

@smejak I am closing this issue. If you encounter it again, please reopen it. Thank you 🙏

@smejak
Copy link
Author

smejak commented Sep 30, 2022

Hi @calina-c, thanks for the response, the command you sent works, but manually installing coincurve does not solve the error I get when installing ocean-lib, for some reason I'm still getting the same "Can't build wheel for coincurve error" even if it's already installed.

@kremalicious
Copy link
Contributor

kremalicious commented Oct 3, 2022

Is this the issue? ofek/coincurve#111

Update: sorry, meant the closed one, updated link above

@smejak
Copy link
Author

smejak commented Oct 3, 2022

Hey @kremalicious, no the issue I'm getting is the error message above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants