-
Notifications
You must be signed in to change notification settings - Fork 9
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
pyhermes module not found #22
Comments
Yes, I am totally following the same steps as described there. Curiously I do not get any error or strange warning in the installation step, but then, it does not find the pyhermes package. |
Here are the steps which should be checked for the Python binding to work:
$ python
Python 3.10.2 (main, Jan 17 2022, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyhermes
>>> dir(pyhermes)
['BremsstrahlungIntegrator', 'CircularWindow', 'DarkMatterIntegrator', (...), 'units']
This has been trying many times on various machines, so please double-check all of these and report back if you have some strange outputs or errors. |
I have followed those steps and found a couple of differences with respect what you described:
Then, after the make -j step, I got the "[100%] Linking CXX shared module pyhermes.cpython-310-x86_64-linux-gnu.so" message as you said. Unfortunately, once I run the make test I get an error at the end: I am attaching to this message the LastTest.log in case it can help. Finally, I tried to import pyhermes but it did not work, as earlier. Should I link the Python interpreter in the cmake step or something like this? |
OK, this test can fail as it only measures performance, i.e., pixel calculation times for various integrators to check for performance regressions when introducing new features or changing the code. These times are somehow manually picked by me to match some reasonably recent desktop hardware, but on laptops, these times could be inadequate. Regarding your issue of loading pyhermes in Python - it looks to me that you have several Python versions installed on your system and with one version your pyhermes module is compiled, while you run the interpreter where you try to load it with the other one. To understand which Python interpreter you run, please give me the output of: |
Yes, you are right, there are many Python versions installed here. The one I have used for installing and, then, for trying to import pyhermes is Python 3.6.7 (this is the output of python -V). |
OK, but you mentioned in your first message a file named |
Yo were right, it seemed that the python version that I had changed when I entered in my environment. Solved now! |
Hello! I am facing the same problem here. I've installed Hermes on Mac OS. I used a virtualenv to install and run it, but I still have the same problem. When I run cmak test, I get this error: The following tests FAILED: |
Hi @fayez0, |
Here it is |
Any idea why I keep getting this error? It seems the code cannot find pyhermes |
Here is the portion of the test that has the error: 9/28 Testing: testIntegrationMethods
|
Could you try to compile it and test it without python first? Just to be sure that the C++ part works properly. |
I got this: /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- D This program built for i386-apple-darwin11.3.0 By the way, I tried to installed on a remote machine via ssh. It passed all tests, but I still the error:
|
please check it carefully, it cannot be invalid argument:
|
Same issue |
This is an issue, and it seems it is related to GSL and new OS X - look here for a possible solution. |
Maybe reinstalling GLS or BLAS (openblas from homebrew?) and repeating the hermes compilation could fix the issue. BTW, your issue is unrelated to the first one, for which this thread was created, as in your case the pyhermes module is successfully compiled and all of tests run OK except that one. Hence, in this case, it would be better to open a new ticket. |
This doesn't seem to be the problem: I tried to install hermes on a cluster with Ubuntu 22 using ssh. It installs perfectly and when I run make test, I get: .... Total Test time (real) = 12.12 sec However, I still have the same error. (hermes) fayez@sudhir-linux-server:~/hermes/build$ python
|
I have problem , when I import pyhermes make -j |
Hi @gr-soawnit, which version/distribution of Linux do you use? |
I so sorry for late response, I try in Ubuntu 20.04 and 22.04
…On Sun, Nov 26, 2023 at 12:07 AM Andrej Dundovic ***@***.***> wrote:
Hi @gr-soawnit <https://github.com/gr-soawnit>, which
version/distribution of Linux do you use?
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEGYPAMQSMT4UYOFTEV4MB3YGIQSPAVCNFSM5PVSOHL2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBSGYZTOOBXGM4A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I try to fix the problem. Now I got I cann't do with sudo make install |
Hi, @gr-soawnit, this error means that you didn't specified a custom install path and the default system one (/lib/) is used for which you need the root permission to copy into.
You can read easily this output: "...trying to install /lib/libhermes.so by copying the file from /home/codex/hermes/build/libhermes.so... err, unfortunately, didn't work: permission denied." So, either you can run |
Hi, @adundovi , I try to solve this follow your advice but it already still have same problem ImportError: /home/hence/hermes/build/pyhermes.cpython-311-x86_64-linux-gnu.so: undefined symbol: _ZN6hermes11nside2orderEj now, I install in ubuntu 22.24, another partition, it got back to problem "ModuleNotFoundError: No module named 'pyhermes'" CMAKE_PREFIX_PATH=$HERMES_DIR cmake -DCMAKE_INSTALL_PREFIX=$HERMES_DIR -DENABLE_COVERAGE=ON -DENABLE_PYTHON=ON -DENABLE_TESTING=ON .. -- Build Type: Release |
I install python 3.10.12 for new installation |
Do you know how to use Docker? I can prepare a docker image with jupyter and HERMES which should straightforward to install? |
@adundovi I already have python-dev but don't sure, this cann't find path Docker image, It okay. I have used it before, but I'm not familiar with it. it will be helpful. |
@gr-soawnit, I updated the code with two things:
docker build -t jupyter-pyhermes .
docker run --name jupyter -it --rm -p 8888:8888 -v $HOME/jupyter-work:/home/jovyan/work localhost/jupyter-pyhermes:latest See the bottom of INSTALL for more information. |
Hello!
Python is having troubles to find the pyhermes module, even though I am importing pyhermes in the build folder, where the pyhermes.cpython-38-x86_64-linux-gnu.so is located. I have tried adding explicitly the build path to the PYTHONPATH variable and to the python sys.path(), but for both cases I get the same error:
>>> import pyhermes
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pyhermes'
I am installing Hermes in a cluster of computers, within an environment where I have full control, and there was no problem in the installation process.
Any ideas on how to solve this?
Thanks!
The text was updated successfully, but these errors were encountered: