osx cpu only version fails with missing native library: symbol not found
See original GitHub issuehttps://stackoverflow.com/questions/67455890/pytorch-cpu-only-on-osx-fails-with-symbol-not-found
I am trying to get started with PyTorch - on a mac osx computer. However, basic steps fail:
from torch_sparse import coalesce, SparseTensor
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-1-dad8246d5249> in <module>
----> 1 from torch_sparse import coalesce, SparseTensor
/usr/local/Caskroom/miniconda/base/envs/my_conda_env/lib/python3.8/site-packages/torch_sparse/__init__.py in <module>
10 '_saint', '_padding'
11 ]:
---> 12 torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
13 library, [osp.dirname(__file__)]).origin)
14
/usr/local/Caskroom/miniconda/base/envs/my_conda_env/lib/python3.8/site-packages/torch/_ops.py in load_library(self, path)
102 # static (global) initialization code in order to register custom
103 # operators with the JIT.
--> 104 ctypes.CDLL(path)
105 self.loaded_libraries.add(path)
106
/usr/local/Caskroom/miniconda/base/envs/my_conda_env/lib/python3.8/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
371
372 if handle is None:
--> 373 self._handle = _dlopen(self._name, mode)
374 else:
375 self._handle = handle
OSError: dlopen(/usr/local/Caskroom/miniconda/base/envs/my_conda_env/lib/python3.8/site-packages/torch_sparse/_version.so, 6): Symbol not found: __ZN3c105ErrorC1ENS_14SourceLocationERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE
Referenced from: /usr/local/Caskroom/miniconda/base/envs/my_conda_env/lib/python3.8/site-packages/torch_sparse/_version.so
Expected in: flat namespace
in /usr/local/Caskroom/miniconda/base/envs/my_conda_env/lib/python3.8/site-packages/torch_sparse/_version.so
I am using a conda environment of:
name: my_conda_env
channels:
- pytorch
- conda-forge
- defaults
dependencies:
- python>=3.8
- pytorch
- pytorch_geometric
and instantiated it using:
conda env create --force -f environment.yml
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (4 by maintainers)
Top Results From Across the Web
pytorch (cpu only) on osx fails with symbol not found
I am trying to get started with PyTorch - on a mac osx computer. However, basic steps fail:
Read more >dyld: Symbol not found: swift34swi… | Apple Developer Forums
This issue happens for chained dependencies. Suppose you have App -> A.framework -> B.framework. If you change B's target OS version and rebuilt...
Read more >Steam/Troubleshooting - ArchWiki
If individual games or Steam itself is failing to launch when using steam-native you are probably missing libraries. To find the required ...
Read more >Shrink, obfuscate, and optimize your app - Android Developers
Code shrinking (or tree-shaking): detects and safely removes unused classes, fields, methods, and attributes from your app and its library dependencies (making ...
Read more >Building the JDK - OpenJDK
If configure fails due to missing dependencies (to either the toolchain, build tools, external libraries or the boot JDK), most of the time...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah – I misspoke. For some reason the
pip
version oftorch
doesn’t play well with mydebugpy==1.5.1
on macOS (it crashes with code 245). So thinking about it again I don’t think this is apyg
issue at all, sorry about that.Indeed, https://github.com/conda-forge/pytorch_sparse-feedstock/issues/13 is the problem The manual installation of pytorch geometric and its dependencies such as pytorch sparse using pip https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html is a currently suitable workaround