image not found in Mac OS 2.0.0 install from PyPi.
See original GitHub issueIn a fresh environment. I installed
python -m pip install pyscf
The .whl that was downloaded was pyscf-2.0.0-cp39-cp39-macosx_10_13_x86_64.whl
It installed properly but when I tried to import pyscf.
Python 3.9.7 (default, Oct 13 2021, 06:45:31)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyscf
Traceback (most recent call last):
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/lib/misc.py", line 54, in load_library
return numpy.ctypeslib.load_library(libname, _loaderpath)
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/numpy/ctypeslib.py", line 149, in load_library
return ctypes.cdll[libpath]
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 449, in __getitem__
return getattr(self, name)
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 444, in __getattr__
dll = self._dlltype(name)
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/lib/libcgto.dylib, 6): Library not loaded: @rpath/libcint.4.dylib
Referenced from: /Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/lib/libcgto.dylib
Reason: image not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/__init__.py", line 114, in <module>
from pyscf import gto
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/gto/__init__.py", line 19, in <module>
from pyscf.gto import mole
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/gto/mole.py", line 46, in <module>
from pyscf.gto import moleintor
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/gto/moleintor.py", line 29, in <module>
libcgto = lib.load_library('libcgto')
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/lib/misc.py", line 62, in load_library
return numpy.ctypeslib.load_library(libname, libpath)
File "/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/numpy/ctypeslib.py", line 149, in load_library
return ctypes.cdll[libpath]
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 449, in __getitem__
return getattr(self, name)
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 444, in __getattr__
dll = self._dlltype(name)
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/lib/libcgto.dylib, 6): Library not loaded: @rpath/libcint.4.dylib
Referenced from: /Users/jamesbrown/Documents/Coding/environments/pyscftest2/lib/python3.9/site-packages/pyscf/lib/libcgto.dylib
Reason: image not found
When I go to /lib/python3.9/site-packages/pyscf/lib/libcgto.dylib
and run
(pyscftest2) jamesbrown@MacBook Pro: jamesbrown lib % otool -l libcgto.dylib | grep libcint && otool -l libcgto.dylib | grep RPATH -A 2
name @rpath/libcint.4.dylib (offset 24)
cmd LC_RPATH
cmdsize 80
path /Users/qssun/workspace/pyscf/pypi/pyscf-2.0/pyscf/lib/deps/lib (offset 12)
--
cmd LC_RPATH
cmdsize 80
path /Users/qssun/workspace/pyscf/pypi/pyscf-2.0/pyscf/lib/deps/lib64 (offset 12)
--
cmd LC_RPATH
cmdsize 32
path /usr/local/lib64 (offset 12)
--
cmd LC_RPATH
cmdsize 72
path /Users/qssun/workspace/pyscf/pypi/pyscf-2.0/pyscf/lib (offset 12)
The installation works when I build from setup.py after cloning the git repository.
Issue Analytics
- State:
- Created 2 years ago
- Comments:22
Top Results From Across the Web
imaginAIry - PyPI
ImaginAIry. Downloads image Code style: black Python Checks. AI imagined images. Pythonic generation of stable diffusion images. "just works" on Linux ...
Read more >How to install Tensorflow on the Apple M1 Notebook
python -m pip install tensorflow-macos will run Python 2 and ask it to install tensorflow which is why you're getting the error that...
Read more >Python module not found even though "Requirement Already ...
Run in command prompt. pip list. Check what version you have installed on your system if you have an old version.
Read more >Installation - Pillow (PIL Fork) 9.3.0 documentation
Pillow >= 1.0 no longer supports import Image . ... We provide binaries for macOS for each of the supported Python versions in...
Read more >Installation from PyPI - Apache Airflow
Installing via Poetry or pip-tools is not currently supported. If you wish to install airflow using those tools you should use the constraints...
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
In next release, the source code and makefiles will be included in the sdist file on pypi.
The new wheel worked for me! I assume this issue can be closed now?