question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

issues on installing PySCF on macOS

See original GitHub issue

I meet some problem to install PySCF on macOS

When typing the command pip install pyscf

It returns the following error message: CMake Error: The source directory “/private/var/folders/5p/b3ktcws11wj9n121wr0880_m0000gn/T/pip-install-x07nj3w5/pyscf_c92bd6e624a54c1db03f02801a043128/pyscf/lib” does not appear to contain CMakeLists.txt.

Anyone meets the similar problem and know how to solve this problem?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
bsonghaocommented, Aug 17, 2022

I resolve the problem. Following the instruction in the PySCF documentation https://pyscf.org/install.html#compile-c-extensions

But currently PySCF does not support pre-build for arm64 Macs and the only way to compile is to compile from the source code which is inconvenient for Mac users.

0reactions
HuangJunyecommented, Nov 7, 2022

I resolve the problem. Following the instruction in the PySCF documentation https://pyscf.org/install.html#compile-c-extensions

But currently PySCF does not support pre-build for arm64 Macs and the only way to compile is to compile from the source code which is inconvenient for Mac users.

Following the instructions on https://pyscf.org/install.html#compiling-from-source-code solved the issue for me.

Just a note that the export path is something like this if you are using anaconda / miniconda:

export PYTHONPATH=/opt/miniconda/lib/python3.9/site-packages/pyscf:$PYTHONPATH

Edit: Pyscf is still not properly installed. I am figuring it out.

Edit edit: solved the issues by copying the folder pyscf/pyscf (not the top level pyscf) folder after compiling to the folder of site-packages. Previously I cloned the repo directly to the site-packages folder and so the even when I add site-packages/pyscf into $PYTHONPATH , because the path to site-packages is already in sys.path it imported the top level pyscf not pyscf/pyscf. That’s why import pyscf works but pyscf.__version__ returns nothing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple Installation issues for macosx-arm64 #1015 - GitHub
I have tried two methods of building pyscf for platform macOS-arm64 (Apple silicon): 1. pip install pyscf and 2.
Read more >
Installation - PySCF
pip install pyscf. The pip package provides a precompiled PySCF code (python wheel) which works on almost all Linux systems, and most of...
Read more >
pyscf - PyPI
PySCF : Python-based Simulations of Chemistry Framework. ... pip install pyscf. Copy PIP instructions. Latest version. Released: Sep 23, 2022.
Read more >
Pyscf install error: failed building wheel - python - Stack Overflow
You can try 'conda install -c conda-forge pyscf'. It worked for me.
Read more >
Qiskit issues with Apple Silicon?
For both the qasm and statevector simulator backends, the code is painfully slow. For comparison, I ran it on my 2013 MacBook Pro...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found