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

request more detail in 'sympref diagnose' #1009

Closed
kwanlowe opened this issue Feb 26, 2020 · 5 comments · Fixed by #1201
Closed

request more detail in 'sympref diagnose' #1009

kwanlowe opened this issue Feb 26, 2020 · 5 comments · Fixed by #1201
Milestone

Comments

@kwanlowe
Copy link

Hello:

This is opened in reference to this thread: https://octave.1599824.n4.nabble.com/Octave-unable-to-find-python-when-using-symbolic-toolbox-tt4695912.html#a4695924

To assist with troubleshooting, is it possible to provide the full path to the python binary that is being used? I use Python virtualenv and run Octave either from the host installation (e.g., dnf install octave, apt install octave) or via Snaps or Flatpaks. Teasing out which Python is actually being called can help troubleshoot various issues.

Thanks and best regards,
Kwan

@mtmiller
Copy link
Collaborator

is it possible to provide the full path to the python binary

You mean you'd like sympref diagnose to show the full path to whatever python or python3 that it found in the PATH, right?

Just clarifying, at first glance it looked like you were asking if you could "provide" the full path to a Python of your choosing, which yes you can.

@mtmiller
Copy link
Collaborator

See also #1008 I opened for a slightly different troubleshooting idea.

@kwanlowe
Copy link
Author

Yes, I'd like the sympref diagnose to show the python path that is being used.

I was trying do this with python itself. For example, to get the module info:

octave:25> unix("python3 -c 'help(\"modules\")'|grep -i sympy ")
ans =  1

I couldn't get a working snippet that would output the detail though..

@kwanlowe
Copy link
Author

Here's the snippet that should do it:

octave:1> unix("python3 -c 'import sys;  print(sys.executable)'")
/home/kwan/bin/python_venv/p36/bin/python3

@mtmiller
Copy link
Collaborator

mtmiller commented Feb 27, 2020

In OctSymPy terms, that would be

exe = python_cmd ('return sys.executable');

Would you like to work on PR to add this info to diagnose?

@cbm755 cbm755 added this to the 3.1.0 milestone Jun 24, 2022
@cbm755 cbm755 modified the milestones: 3.1.0, 3.0.1 Jul 6, 2022
alexvong243f pushed a commit to alexvong243f/octsympy that referenced this issue Aug 5, 2022
...POSIX environment when using non-Pythonic IPC.

Partially fixes gnu-octave#1009.

* inst/private/assert_have_python_and_sympy.m: Update it.
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

Successfully merging a pull request may close this issue.

3 participants