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

When "syms x": error: 'python_ipc_popen2' undefined near line 57 column 15 #424

Closed
finalsnd opened this issue Apr 25, 2016 · 8 comments
Closed
Labels

Comments

@finalsnd
Copy link

finalsnd commented Apr 25, 2016

>> pkg install -forge symbolic
For information about changes from previous versions of the symbolic package, run '
news symbolic'.
>> pkg load symbolic
>> syms x
error: 'python_ipc_popen2' undefined near line 57 column 15
error: called from
    python_ipc_driver at line 57 column 13
    python_cmd at line 166 column 9
    sym at line 364 column 5
    syms at line 158 column 9
error: evaluating argument list element number 3
error: called from
    syms at line 158 column 9

I tried the bundle one too:

>> pkg uninstall symbolic
>> pkg install symbolic-win-py-bundle-2.3.0.zip
For information about changes from previous versions of the symbolic package, run '
news symbolic'.
>> pkg load symbolic
>> syms x
error: 'python_ipc_popen2' undefined near line 57 column 15
error: called from
    python_ipc_driver at line 57 column 13
    python_cmd at line 166 column 9
    sym at line 364 column 5
    syms at line 158 column 9
error: evaluating argument list element number 3
error: called from
    syms at line 158 column 9
>> ver
----------------------------------------------------------------------
GNU Octave Version: 4.0.0
GNU Octave License: GNU General Public License
Operating System: MINGW32_NT-6.2 Windows 6.2  i686
----------------------------------------------------------------------
Package Name  | Version | Installation directory
--------------+---------+-----------------------
    symbolic *|   2.3.0 | ...\Octave-4.0.0\share\octave\packages\symbolic-2.3.0

If i open a cmd and i type python:

Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from sympy import *
>>> x = Symbol('x')
>>> limit(sin(x)/x, x, 0)

In my path variable for windows, i have:

C:\Users\User\AppData\Local\Programs\Python\Python35-32\Scripts;C:\Users\User\AppData\Local\Programs\Python\Python35-32\

I need to use Python 3.5.1 for other programs and scripts. Maybe is a problem with the python ver? Is it mandatory to use Python 2.7 ?

@finalsnd
Copy link
Author

finalsnd commented Apr 25, 2016

OK.

I fixed it creating a new system variable: "Python" with the value:
C:\Users\User\AppData\Local\Programs\Python\Python35-32\

I don't understand why the bundle didn't work.

@cbm755 cbm755 reopened this Apr 26, 2016
@cbm755
Copy link
Collaborator

cbm755 commented Apr 26, 2016

Glad it works but I'm going to keep this open a little longer...

  1. I didn't think the "Python" environment variable would have any effect on Symbolic 2.3.0 (it should in git master, but that is something else). BTW, is it "Python" or "PYTHON"?
  2. I'm also surprised that the bundle didn't work. I wonder if you had restarted Octave if it would have? Or "clear all; clear classes; clear all". The error (error: 'python_ipc_popen2' undefined) is suspicious: I tihnk that might be the sort of thing that happens if you modify certain m files while having a instance of the sym class in the workspace.

If you feel like testing some more, you could delete that environment variable, reboot and try again...

@finalsnd
Copy link
Author

The system variables in windows, unlike linux/unix, are not case sensitive. Yeah, it's better to use it with mayus (because some programs that comes from unix systems may check only the case ones).

Anyway, i deleted the variable and everything works fine. When i had this problem, i had tried with "clear all; clear classes; clear all" and didn't work, but it seems that maybe resetting octave fixed it.

Sorry for no double-check!

I have a few problems, but i don't think they're related with this one. I will open a new issue.

@cbm755
Copy link
Collaborator

cbm755 commented Apr 26, 2016

Ok, I'll close this then.

@cbm755 cbm755 closed this as completed Apr 26, 2016
@paolomagalini
Copy link

Glad it works but I'm going to keep this open a little longer...

  1. I didn't think the "Python" environment variable would have any effect on Symbolic 2.3.0 (it should in git master, but that is something else). BTW, is it "Python" or "PYTHON"?
  2. I'm also surprised that the bundle didn't work. I wonder if you had restarted Octave if it would have? Or "clear all; clear classes; clear all". The error (error: 'python_ipc_popen2' undefined) is suspicious: I tihnk that might be the sort of thing that happens if you modify certain m files while having a instance of the sym class in the workspace.

If you feel like testing some more, you could delete that environment variable, reboot and try again...

I had same problem. As you said, closing and reopening Octave did work and loaded python with no problems...

@cbm755
Copy link
Collaborator

cbm755 commented Apr 19, 2019

The error: 'python_ipc_popen2' undefined is now documented in the wiki. Thanks for reminding me this bug exists: I will link this issue from the wiki.

My best guess is some antivirus software writes a file into our package directory, or modifies the time-stamps or some such. Octave then thinks the class implementation has changed and we get such errors.

As far as I've heard from folks, it only happens on initial installation: once you restart Octave, everything works fine...

@seoashish
Copy link

you're right cbm755
it work
restart Octave, and everything works fine

@Akram9
Copy link

Akram9 commented Jun 6, 2020

Hey, just wanted to say restarting is required in v5.2.0 after installing symbolic package.

The error: 'python_ipc_popen2' undefined is now documented in the wiki.

This is good, but perhaps a message in the console could be displayed post successful install that a restart is required to use the package.

Peace!

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

No branches or pull requests

5 participants