Skip to content
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

Installation problems about step 1.3 #56

Open
Derek-art opened this issue Jul 13, 2024 · 14 comments
Open

Installation problems about step 1.3 #56

Derek-art opened this issue Jul 13, 2024 · 14 comments

Comments

@Derek-art
Copy link

image
image
image

@lu1and10
Copy link
Member

it seems in the last cp -f lib/libfmm3d_dll.lib C:\lib/ command something is broken.
Could you check if there is lib/libfmm3d_dll.lib in your source directory and manually copy lib/libfmm3d_dll.lib to C:\lib works or not?

@Derek-art
Copy link
Author

在最后一个命令中似乎有什么东西坏了。你能检查一下你的源目录中是否有并手动复制到作品中吗?cp -f lib/libfmm3d_dll.lib C:\lib/``lib/libfmm3d_dll.lib``lib/libfmm3d_dll.lib``C:\lib

thank you for your advice,I have sovled this problem by changing yo Ubuntu ,but I have another question when run'make python'

@Derek-art
Copy link
Author

ea50cea1ee342f476caa322483a1479

@lu1and10
Copy link
Member

it might because of the PEP668, the following link discussed some solutions: https://stackoverflow.com/questions/75602063/pip-install-r-requirements-txt-is-failing-this-environment-is-externally-mana

Are you able to install numpy if you type python3 -m pip install numpy?
We are moving to the new python build process.
So after you use python virtual environment, instead of using make python, could you also try pip install . -v

@Derek-art
Copy link
Author

Derek-art commented Jul 16, 2024

it might because of the PEP668, the following link discussed some solutions: https://stackoverflow.com/questions/75602063/pip-install-r-requirements-txt-is-failing-this-environment-is-externally-mana

Are you able to install numpy if you type ? We are moving to the new python build process. So after you use python virtual environment, instead of using , could you also try python3 -m pip install numpy``make python``pip install . -v

I try to change to the virtual environment,but it mention that as follows:
Traceback (most recent call last):
File "/home/xinyu/myenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/home/xinyu/myenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xinyu/myenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-p2pts9fn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-p2pts9fn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-p2pts9fn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "", line 4, in
ModuleNotFoundError: No module named 'numpy.distutils'
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/xinyu/myenv/bin/python3 /home/xinyu/myenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp_iuq8qb6
cwd: /home/xinyu/Documents/FMM3D-1.0.4/python
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

How can I bulid wheel successully? I have numpy installed already,why can't find numpy.distutils?
3ef3299f8b17a44cf6f5ab574496a17

@lu1and10
Copy link
Member

As I mentioned, did you try 'pip install . -v' instead of 'make python'. I can't see what command you typed in your terminal.
I guess 'make python' is not working for python 3.12. How about 'pip install . -v'?

@Derek-art
Copy link
Author

正如我所提到的,您是否尝试过“pip install .-v“而不是”make python“。我看不到您在终端中输入了什么命令。我想“make python”不适用于 python 3.12。'pip install .-v'?
I have tried。
5e956e497c3bea7db900f7a99c7a5e5
7583d0149da16bf0b8d553bd118b4c0

@lu1and10
Copy link
Member

I see you 'cd python', could you don't 'cd python', and just stay in FMM3D-1.0.4 folder and try pip install . -v

@lu1and10
Copy link
Member

Also please update/download the new repo, there is some changes in the new repo. I think you are using the old repo. The latest change is last Thursday.

@Derek-art
Copy link
Author

Derek-art commented Jul 18, 2024

另外,请更新/下载新的存储库,新存储库中有一些变化。我认为您正在使用旧的存储库。最新的变化是上周四。

99299fe2efd5ff0511e3a26e19b6f14
4f59c2d314696602c2e28ea4f5182dc

Thank you for your suggestion. I successfully installed fmm3dpy by running pip install . -v in the FMM3D directory. However, when I ran pytest in the same directory, I encountered an error that seems to be due to circular imports. Could you please advise on how to resolve this?
else,I encountered the following issue while trying to compile a C program in the FMM3D/C directory. When executing the corresponding .make file, it prompts me that the gfortran file cannot be found, but I have already added the corresponding environment variable. I am not sure what the cause of the error is.
a29bed3db0f4a3825e90abe29c24ca9
c8fa5cf15d3af44e22a5123e8692aaf

@lu1and10
Copy link
Member

lu1and10 commented Jul 18, 2024

It looks like pytest is not finding the right python which installed the fmm3dpy-1.0.4
After activating your virtual env, could you try which python and see if the python is the one in your myenv, if the python is under your myenv, then could you try python -m pip list to see if fmm3dpy-1.0.4 is installed. Then try python python/test/test_lfmm.py and python python/test/test_hfmm.py works or not(don't cd to python, just stay in the fmm3d directory and try python python/test/test_lfmm.py).

for c/fortran/c++ code, could you check is the gcc-13 is installed? if so could you edit all the makefiles your are using to use gcc-13/gfortran-13/g++-13, it seems the system finds libgfortran.so of gcc-13, gcc-9 maybe the old compiler on the system.

@Derek-art
Copy link
Author

看起来没有找到安装 fmm3dpy-1.0.4 的正确 python 激活您的虚拟环境后,您能否尝试查看 python 是否是您的 myenv 中的那个,如果 python 在您的 myenv 下,那么您可以尝试查看是否安装了 fmm3dpy-1.0.4。然后尝试和工作与否(不要cd到python,只需留在fmm3d目录中并尝试)。pytest``which python``python -m pip list``python python/test/test_lfmm.py``python python/test/test_hfmm.py``python python/test/test_lfmm.py

对于 C/Fortran/C++ 代码,您能否检查是否安装了 GCC-13?如果是这样,您可以编辑用于使用 gcc-13/gfortran-13/g++-13 的所有 makefile,似乎系统找到了 gcc-13、gcc-9 可能是系统上的旧编译器。libgfortran.so
79db223d9a8f2fe86c9ec7a506a05be
ee237edba94e54f56c8a2197a258be4
96741455aedf47f299146a308aa2aa8
855a18ceb16ec1a61a995527414d7c1

I check the latest version of ffmm3dpy library is only 1.0.0 ah, also, gcc-9 is specifically under me, because I see that under lfmm3d_example.make it is written as gcc-9, I don't know if my understanding is wrong or not?

@lu1and10
Copy link
Member

lu1and10 commented Jul 18, 2024

you can manually change lfmm3d_example.make yourself to use gcc-13, it is not required to use gcc-9, it was a dev makefile to test.
in the image #56 (comment)
It shows 1.0.4 is installed for you myenv python, while you still see 1.0.0. I'm confused about your python environment.
could pip uninstall fmm3dpy for your root python env and virtual myenv? Then pip install . -v to make sure 1.0.4 is installed.

@Derek-art
Copy link
Author

您可以手动更改lfmm3d_example.make 自己使用 GCC-13,不需要使用 GCC-9,这是一个要测试的开发 Makefile。在图像 #56 中(评论)它显示 1.0.4 已为您安装 myenv python,而您仍然看到 1.0.0。我对你的 python 环境感到困惑。可以为您的根 python env 和 virtual myenv 吗?然后确保安装了 1.0.4。pip uninstall fmm3dpy``pip install . -v
image
image
Thank you very much for your tireless answer, I have one more question, how should I understand about nd(number of density) in emfmm3d? Why can it be used as a parameter of E and a parameter of e_charge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants