Octave symbolic packag fails to import SymPy - octave

I get an error message when I try to make use of symbolic package in Octave.
>> pkg load symbolic
>> syms x y
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named sympy
OctSymPy v2.6.0: this is free software without warranty, see source.
Initializing communication with SymPy using a popen2() pipe.
error: Python cannot import SymPy: have you installed SymPy?
error: called from
assert_have_python_and_sympy at line 37 column 5
python_ipc_popen2 at line 78 column 5
python_ipc_driver at line 59 column 13
python_cmd at line 164 column 9
valid_sym_assumptions at line 38 column 10
assumptions at line 82 column 7
syms at line 97 column 13
What am I doing wrong?

Related

phpmyAdmin not working after using MySQL/MariaDB upgrade on WHM

My Moodle site required I upgrade its database from MySQL 5.7.3 to MariaDB 10.2. I upgraded it to 10.3 through the MySQL/MariaDB Upgrade package on WHM, but after the upgrade, it gave this error:
"The MySQL/MariaDB server is not currently running. If this is not intentional, you may experience problems with your upgrade."
Due to this, my PhpMyAdmin has not been working with an error:
Failed to connect to “/var/lib/mysql/mysql.sock”; will fall back to TCP/IP. (Cpanel::Exception::IO::SocketConnectError/(XID yhcqsd) The system failed to connect a UNIX domain socket to “/var/lib/mysql/mysql.sock” because of an error: Connection refused at /usr/local/cpanel/Cpanel/Autodie/CORE/connect.pm line 29.
Cpanel::Autodie::connect(GLOB(0x3deab18), "\x{1}\x{0}/var/lib/mysql/mysql.sock\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}"...) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 181
Cpanel::MysqlUtils::Unprivileged::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x3d53f70), Try::Tiny::Catch=REF(0x3d96b98)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 186
Cpanel::MysqlUtils::Unprivileged::_get_socket("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 90
Cpanel::MysqlUtils::Unprivileged::get_version_from_host("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 64
Cpanel::MysqlUtils::Running::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x3c23df0), Try::Tiny::Catch=REF(0x3dc2688)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 68
Cpanel::MysqlUtils::Running::is_mysql_running() called at whostmgr/bin/whostmgr.pl line 6734
main::mysqlupgrade("mysqlupgrade") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 366
Whostmgr::Dispatch::_do_call("mysqlupgrade", HASH(0x317bc98), HASH(0x316dfa0)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 178
Whostmgr::Dispatch::dispatch("mysqlupgrade", 1, ARRAY(0x317bc08), HASH(0x316dfa0)) called at whostmgr/bin/whostmgr.pl line 441
) at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 184.
at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 184.
Cpanel::MysqlUtils::Unprivileged::__ANON__(Cpanel::Exception::IO::SocketConnectError=HASH(0x3dead10)) called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 121
Try::Tiny::try(CODE(0x3d53f70), Try::Tiny::Catch=REF(0x3d96b98)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 186
Cpanel::MysqlUtils::Unprivileged::_get_socket("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 90
Cpanel::MysqlUtils::Unprivileged::get_version_from_host("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 64
Cpanel::MysqlUtils::Running::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x3c23df0), Try::Tiny::Catch=REF(0x3dc2688)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 68
Cpanel::MysqlUtils::Running::is_mysql_running() called at whostmgr/bin/whostmgr.pl line 6734
main::mysqlupgrade("mysqlupgrade") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 366
Whostmgr::Dispatch::_do_call("mysqlupgrade", HASH(0x317bc98), HASH(0x316dfa0)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 178
Whostmgr::Dispatch::dispatch("mysqlupgrade", 1, ARRAY(0x317bc08), HASH(0x316dfa0)) called at whostmgr/bin/whostmgr.pl line 441
All my sites on the server are down, and they threw an "unable to establish connection to database" error. I don't know where to go from here.
Please what can I do?

Octave 4.2.2 and sympy 1.6

Iam trying to use Octave 4.2.2 with Symbolic pkg v.2.9.0 but I get this error related to sympy package:
Your kit looks good for running the Symbolic package. Happy hacking!
>>
>> syms
Symbolic variables in current scope:
>> a = sym( "a" );
Symbolic pkg v2.9.0: /home/usuario/.local/lib/python3.6/site-packages/sympy/__init__.py:676: SymPyDeprecationWarning:
importing sympy.core.compatibility with 'from sympy import *' has been
deprecated since SymPy 1.6. Use import sympy.core.compatibility
instead. See https://github.com/sympy/sympy/issues/18245 for more
info.
deprecated_since_version="1.6").warn()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 12, in octoutput_drv
File "<stdin>", line 54, in octoutput
File "<stdin>", line 55, in octoutput
File "/home/usuario/.local/lib/python3.6/site-packages/sympy/__init__.py", line 677, in __getattr__
return getattr(self.mod, name)
AttributeError: module 'sympy.core.compatibility' has no attribute 'integer_types'
Waiting................warning: readblock: timeout of 30 exceeded, breaking out
warning: called from
readblock at line 101 column 7
python_ipc_popen2 at line 99 column 14
python_ipc_driver at line 62 column 13
pycall_sympy__ at line 163 column 9
sym at line 452 column 9
no output so far
error: ipc_popen2: something wrong? timed out starting python
error: called from
python_ipc_popen2 at line 101 column 7
python_ipc_driver at line 62 column 13
pycall_sympy__ at line 163 column 9
sym at line 452 column 9
>> a
error: 'a' undefined near line 1 column 1
>>
I dig into code and find this two references:
https://github.com/sympy/sympy/pull/18245
https://github.com/sympy/sympy/pull/19316
But Iam not a programmer so any idea is greatly appreciated.
I tried to uninstall sympy-1.6 and install sympy-1.5 but that doesn't work.
Thanks for your time.
Daniel
I have managed to found the answer.
The problem is on sympy version 1.6 so I downgraded it to version 1.5.1 with pip3.
I had a similar issue, the problem seems to be that you have to install sympy for python2 not for python3. Install it with pip and then try typing in octave
sympref diagnose
And it will tell you that the current interpreter is python3, you got to change this.
setenv PYTHON python2
sympref reset
Because apparently the symbolic package was developed for python2.
I hope I could help you.

Symbolic package and Octave is working only for supersimple tasks. Am I doing anything wrong?

I have installed (on Windows machine (Win7 64bit)):
python 3.5.0 and sympy 0.7.6.1
octave 4.0.0.0 and symbolic 2.2.2
This is what I get when I try to do anything with more than one operator:
>> pkg load symbolic
>> syms x
OctSymPy v2.2.2: this is free software without warranty, see source.
Initializing communication with SymPy using a popen2() pipe.
Detected Windows: using "winwrapy.bat" to workaround Octave bug #43036
Some output from the Python subprocess (pid 28092) might appear next.
OctSymPy: Communication established. SymPy v0.7.6.1.
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC v.1900 32 bit (Int
el)]
>> x^2
ans = (sym)
2
x
>> x^2 + 2*x + 1
PYTHON: Error in var export
Resetting the octsympy communication mechanism
Closing the Python pipe...
error: python_cmd: unexpected return
error: called from
python_cmd at line 143 column 6
mtimes at line 42 column 5
>>
What is wrong?

How to install io package for Octave on Mac

I am trying to install the 'io' package for Octave on my Macbook Air, because I want to convert the .mat file into .xls file. However, when I try to install the package, the following errors appear:
octave:33> pkg install io-2.2.6.tar.gz
gzip: /Users/mlt660609/Downloads/io-2.2.6.tar.gz: not in gzip format
A(I): index out of bounds; value 3 out of bound 2
error: called from 'install' in file /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/install.m near line 102, column 19
error: called from:
error: /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/install.m at line 146, column 5
error: /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/pkg.m at line 394, column 9
Anyone can help?? Thanks.

ImportError: No module named google.appengine.ext

I have just got the release pipeline working with Google's push to deploy on App Engine.
I released that some of my unit tests were failing.
======================================================================
ERROR: Failure: ImportError (No module named google.appengine.ext)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 414, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/var/jenkins/workspace/deployment_5175583809994752_1410355681821/tests.py", line 9, in <module>
from cfc.search.nosqlhelper import set_meeting_date
File "/var/jenkins/workspace/deployment_5175583809994752_1410355681821/cfc/search/nosqlhelper.py", line 3, in <module>
from cfc.models.event import Event
File "/var/jenkins/workspace/deployment_5175583809994752_1410355681821/cfc/models/event.py", line 3, in <module>
from google.appengine.ext import ndb
ImportError: No module named google.appengine.ext
----------------------------------------------------------------------
Ran 1 test in 0.270s
I tried to run the following from python REPL in the VM containing Jenkins provisioned automatically via release pipeline in Google Developer Console.
from google.appengine.ext import ndb
I got the following error.
ImportError: No module named google.appengine.ext
I logged into the VM and noticed that the files are located at for instance:
var/lib/docker/aufs/mnt/bbc6deda44e4806c5c0e377df6f1109733e382e8531c1c9ed440084d8e98e3fe/google-cloud-sdk/platform/google_
appengine/google/appengine/ext/ndb/utils.py
How do I se the path universally in the VM ?