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

problems on M1 #17

Open
cmungall opened this issue Nov 8, 2022 · 9 comments
Open

problems on M1 #17

cmungall opened this issue Nov 8, 2022 · 9 comments

Comments

@cmungall
Copy link
Contributor

cmungall commented Nov 8, 2022

When running poetry run python -m unittest

I get

======================================================================
ERROR: tests.test_plugin (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_plugin
Traceback (most recent call last):
  File "/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/Users/cjm/repos/oakx-grape/tests/test_plugin.py", line 4, in <module>
    from oaklib.implementations import get_implementation_resolver
  File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/oaklib/__init__.py", line 9, in <module>
    from oaklib.selector import get_implementation_from_shorthand  # noqa:F401
  File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/oaklib/selector.py", line 8, in <module>
    from oaklib.implementations import GildaImplementation
  File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/oaklib/implementations/__init__.py", line 28, in <module>
    from oaklib.implementations.pronto.pronto_implementation import ProntoImplementation
  File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/oaklib/implementations/pronto/pronto_implementation.py", line 13, in <module>
    import pronto
  File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/pronto/__init__.py", line 24, in <module>
    from .definition import Definition
  File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/pronto/definition.py", line 5, in <module>
    from .xref import Xref
  File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/pronto/xref.py", line 6, in <module>
    import fastobo
ImportError: dlopen(/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so, 0x0002): tried: '/Users/cjm/Library/Caches/pypoetry/virtualenvs/oakx-grape-pUaGkv-X-py3.9/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

also reported here: fastobo/fastobo-py#313

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

If I do this

poetry export -f requirements.txt --output requirements.txt
pip install -r requirements.txt

then it builds the fastobo wheel rather than trying to use an existing (incorrect) one

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

spoke to soon, still didn't solve it

✗ python
Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00)
[Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fastobo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so, 0x0002): tried: '/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
>>>

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

✗ pip install fastobo
Collecting fastobo
  Using cached fastobo-0.12.1-cp39-cp39-macosx_12_0_arm64.whl
Installing collected packages: fastobo
Successfully installed fastobo-0.12.1
(oakx-grape-env) ➜  oakx-grape git:(main) ✗ ls /Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo*
/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so

/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo-0.12.1.dist-info:
COPYING       INSTALLER     METADATA      RECORD        REQUESTED     WHEEL         top_level.txt

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

(oakx-grape-env) ➜  oakx-grape git:(main) ✗ pip cache remove "*"
Files removed: 708
(oakx-grape-env) ➜  oakx-grape git:(main) ✗
(oakx-grape-env) ➜  oakx-grape git:(main) ✗
(oakx-grape-env) ➜  oakx-grape git:(main) ✗
(oakx-grape-env) ➜  oakx-grape git:(main) ✗ pip uninstall fastobo-py
WARNING: Skipping fastobo-py as it is not installed.
(oakx-grape-env) ➜  oakx-grape git:(main) ✗ pip uninstall fastobo
WARNING: Skipping fastobo as it is not installed.
(oakx-grape-env) ➜  oakx-grape git:(main) ✗ pip install fastobo
Collecting fastobo
  Downloading fastobo-0.12.1.tar.gz (20.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.1/20.1 MB 18.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: fastobo
  Building wheel for fastobo (pyproject.toml) ... done
  Created wheel for fastobo: filename=fastobo-0.12.1-cp39-cp39-macosx_12_0_arm64.whl size=1796933 sha256=f0a943c59bfeaaba11923aaab5ff861546809a0cd061eeff1e74c63cb2dfb8a3
  Stored in directory: /Users/cjm/Library/Caches/pip/wheels/54/ee/59/8ac6727dde642d9bbf7d66ad34bf234a2c5a8218a04365511f
Successfully built fastobo
Installing collected packages: fastobo
Successfully installed fastobo-0.12.1
(oakx-grape-env) ➜  oakx-grape git:(main) ✗
(oakx-grape-env) ➜  oakx-grape git:(main) ✗
(oakx-grape-env) ➜  oakx-grape git:(main) ✗
(oakx-grape-env) ➜  oakx-grape git:(main) ✗ !ls
(oakx-grape-env) ➜  oakx-grape git:(main) ✗ ls /Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo*
/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

(oakx-grape-env) ➜  oakx-grape git:(main) ✗ conda install -c bioconda fastobo
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - fastobo

Current channels:

  - https://conda.anaconda.org/bioconda/osx-arm64
  - https://conda.anaconda.org/bioconda/noarch
  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

✗ file /Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so
/Users/cjm/opt/anaconda3/envs/oakx-grape-env/lib/python3.9/site-packages/fastobo.cpython-39-darwin.so: Mach-O 64-bit dynamically linked shared library x86_64

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

thanks to @hrshdhgd for help, still no further along

@cmungall
Copy link
Contributor Author

cmungall commented Nov 8, 2022

@justaddcoffee shared his .so file, which looks like this:

✗ file ~/Downloads/fastobo.cpython-39-darwin.so
/Users/cjm/Downloads/fastobo.cpython-39-darwin.so: Mach-O 64-bit dynamically linked shared library arm64

I substituted that... and it works!

success... in some sense

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

1 participant