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

FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex'. #4

Closed
prisae opened this issue Jan 30, 2018 · 5 comments
Closed
Labels
question User questions

Comments

@prisae
Copy link
Member

prisae commented Jan 30, 2018

Note: This is an issue I received per email. I reproduce it here so others with the same issue might find the answer.

Hi,

I have just started using python to run your empymod code because I want to run a simple GPR 2-layer model. I have used anaconda and set up the empymod from the prisae channel. I have numpy and scipy installed. However I get an error on the plotting in jupyter notebooks;

FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex'.

Can you give me any advice on how to find the 'latex' folder. I have done some searching on the web, but I have got nowhere.

Thank you

@prisae
Copy link
Member Author

prisae commented Jan 30, 2018

I use in some of the figures LaTeX for math symbols. It appears that you don't have LaTeX installed. Doesn't matter. Just remove the line where it says:

mpl.rcParams['text.usetex'] = True

and then it should work.

Now, a word of caution. That empymod works for GPR is a very interesting fact, but not much more. It shows that the wavenumber-domain solution is exact for any frequency; there are some difficulties with the Hankel and the Fourier transforms at high frequencies, but that is another story (see github.com/empymod/article-fdesign).

However, the strength of empymod is definitely in lower frequencies, such as CSEM. If you plan to do some serious GPR-modelling you might better start with another package, for instance:

Both are written in Python too. They do the calculation directly in the time-domain, and therefore do not face the issues with the Hankel- and Fourier transforms. Furthermore, both allow you to have 2D or 3D models, whereas empymod is restricted to layered models. But in GPR you often want to model 2D or 3D structures, such as pipes, tunnels, caves, etc.

Hope that helps!

@prisae prisae closed this as completed Jan 30, 2018
@prisae prisae added the question User questions label Jul 18, 2018
@LuffyLuffy
Copy link

Thanks!
It really took a long while to install latex without root, and found that still not working!
"mktexfmt [ERROR]: -user mode but path setup is -sys type, bailing out."
just don't use latex in the plot and it will help to offer a default font for plot and modify it by using some figure modified software!

@prisae
Copy link
Member Author

prisae commented Dec 16, 2019

Hi @LuffyLuffy, thanks for reporting. Which examples did you try to run? Because I don't think I use LaTeX any more in any of the updated examples of empymod: https://empymod.readthedocs.io/en/stable/examples/index.html

Where I do use LaTeX was in the publications. Mostly I wrote a comment that removing the line is just enough. E.g., in the notebooks of https://github.com/empymod/article-geo2017

mpl.rcParams['text.usetex'] = True # Comment this if you don't have LaTeX. You might have to adjust some strings.

@LuffyLuffy
Copy link

Hi @LuffyLuffy, thanks for reporting. Which examples did you try to run? Because I don't think I use LaTeX any more in any of the updated examples of empymod: https://empymod.readthedocs.io/en/stable/examples/index.html

Where I do use LaTeX was in the publications. Mostly I wrote a comment that removing the line is just enough. E.g., in the notebooks of https://github.com/empymod/article-geo2017

mpl.rcParams['text.usetex'] = True # Comment this if you don't have LaTeX. You might have to adjust some strings.

Actually, i found some drawing figure scripts with latex and want to use them and found this error, and I google a lot and found your comment here.
Thanks for you sharing. Previously, I was trying so hard to install latex without root. But I failed to make it work. It's your hint that help me to solve the problem and get the figure I want. Thanks again.

@prisae
Copy link
Member Author

prisae commented Dec 17, 2019

Ah I see, it wasn't with empymod, it was just the same problem but with some other scripts. Glad I could help! And thanks for letting me know! Have a great day.

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

No branches or pull requests

2 participants