Closed aulemahal closed 1 year ago
Hi,
I have tried these below:
conda create -n sbck eigen numpy scipy pybind11 cxx-compiler conda activate sbck python3 setup.py install --user
But the following error is still there:
import SBCK as bc Traceback (most recent call last): File "
", line 1, in File "/glade/work/fangwang/MBCn/SBCK-python/SBCK/init.py", line 25, in from .QM import QM File "/glade/work/fangwang/MBCn/SBCK-python/SBCK/QM.py", line 27, in from .tools.Dist import _Dist File "/glade/work/fangwang/MBCn/SBCK-python/SBCK/tools/init.py", line 21, in from .__tools_cpp import SparseHist ModuleNotFoundError: No module named 'SBCK.tools. tools_cpp'
Anything else I need to add? Thank you!
Did you execute the "import SBCK as bc" line from the python folder of the repo ?
I'll add a note because I stumbled on the same issue!
This should work:
conda create -n sbck eigen numpy scipy pybind11 cxx-compiler
conda activate sbck
python setup.py install # no need for --user in a conda env
cd # get out of the source folder
python -c "import SBCK"
The install
line will install compiled files in the python folder, NOT in the current source folder. But if you execute the last line from the source folder, python will actually try to import the source itself and not the installed version.
Hi,
Thank you very much for helping me. After getting out of the source folder and the error disappeared!
Best Regards, Fang
From: Pascal Bourgault @.> Date: Friday, March 24, 2023 at 3:47 PM To: yrobink/SBCK @.> Cc: Fang Wang @.>, Comment @.> Subject: [EXT] Re: [yrobink/SBCK] Add conda installation doc (PR #5) CAUTION: Email Originated Outside of Auburn.
Did you execute the "import SBCK as bc" line from the python folder of the repo ?
I'll add a note because I stumbled on the same issue!
This should work:
conda create -n sbck eigen numpy scipy pybind11 cxx-compiler
conda activate sbck
python setup.py install # no need for --user in a conda env
cd # get out of the source folder
python -c "import SBCK"
The install line will install compiled files in the python folder, NOT in the current source folder. But if you execute the last line from the source folder, python will actually try to import the source itself and not the installed version.
— Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyrobink%2FSBCK%2Fpull%2F5%23issuecomment-1483388109&data=05%7C01%7Cfzw0024%40auburn.edu%7Cce6943fd47d24d0fa02008db2ca8fe41%7Cccb6deedbd294b388979d72780f62d3b%7C1%7C0%7C638152876553108863%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1blZB5A%2Brb3rDNhd89BqU7WxZM5q6vzU%2F1DRqXh9IXc%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAREOWY55WNBKQBKHG5QSXGDW5YB6FANCNFSM6AAAAAAWG4W4EQ&data=05%7C01%7Cfzw0024%40auburn.edu%7Cce6943fd47d24d0fa02008db2ca8fe41%7Cccb6deedbd294b388979d72780f62d3b%7C1%7C0%7C638152876553108863%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5MxjIkfuMxU1%2FUS2VH5tOJpRFmnHmgq08ttB09V8dFY%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>
Dear @aulemahal ,
Thanks for your help
Hi!
This PR adds a bit of documentation on how to install SBCK in a conda environment. It also adds a mention of the needed C++ compiler for installing the python version.