-
Notifications
You must be signed in to change notification settings - Fork 51
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
Matplotlib Example Fails #5
Comments
Hi, I'd guess it might be something along the lines as described in SpaceVim/SpaceVim#1296 (see also the links in there). Unfortunately I don't have access to a Mac and can't try to reproduce the issue. You can check the paths where Python looks for modules using this code: program paths
use forpy_mod
implicit none
integer :: ierror
type(list) :: paths
ierror = forpy_initialize()
ierror = get_sys_path(paths)
ierror = print_py(paths)
end program |
I try this example on windows, and also it only works when put the compiled executable in the path where python.exe located, in my case, "C:\IntelSWTools\intelpython3", it seems that the compiled executable only tries to find python libs in current path. |
This should be fixed by setting the PYTHONHOME environment variable. On Windows: On Mac: |
I'm attempting to run the Matplotlib Example using forpy installed on an iMacPro running Mac OS X Mojave (ver. 10.14.5) under the Anaconda distribution for Python 3.7.
Building the example (see the attached file Example1.F90.txt) was successful, but running a.out results with:
(base) Samuels-Mac-Pro:Matplotlib_example user$ touch *.F90
(base) Samuels-Mac-Pro:Matplotlib_example user$ gfortran -c forpy_mod.F90
(base) Samuels-Mac-Pro:Matplotlib_example user$ gfortran Example1.F90 forpy_mod.o
python3-config --ldflags
(base) Samuels-Mac-Pro:Matplotlib_example user$ ./a.out
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00000001099ea5c0 (most recent call first):
Program received signal SIGABRT: Process abort signal.
Backtrace for this error:
#0 0x106edb39d
#1 0x106eda82b
#2 0x7fff59843b5c
Abort trap: 6
(base) Samuels-Mac-Pro:Matplotlib_example user$
Any suggestions?
Example1.F90.txt
The text was updated successfully, but these errors were encountered: