Failing to import pandas in Anjuta “module functions cannot set METH_CLASS or METH_STATIC”
up vote
0
down vote
favorite
I have this boilerplate in a minimal Anjuta app that runs. I do not want to install pandas to the system python path so I am using Virtualenv. When I add import pandas as pd I get the following error message.
Not sure if this is Anjuta or Pandas related. I have googled for the error message but nothing instrumental. What do I do?
#!/home/USERNAME/my_app/bin/python3.6
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GdkPixbuf, Gdk
import os, sys, gi
...
from shutil import copyfile
import pandas as pd
...
And I get this.
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
Traceback (most recent call last):
File "/home/USERNAME/my_app/src/my_app.py", line 35, in <module>
import pandas as pd
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/__init__.py", line 57, in <module>
from pandas.io.api import *
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/api.py", line 19, in <module>
from pandas.io.packers import read_msgpack, to_msgpack
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/packers.py", line 69, in <module>
from pandas.util._move import (
ValueError: module functions cannot set METH_CLASS or METH_STATIC
----------------------------------------------
Program exited with errcode (1)
Press the Enter key to close this terminal ...
without the import pandas as pd the program runs just fine...
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
/home/USERNAME/my_app/test.xlsx
----------------------------------------------
Program exited with errcode (0)
Press the Enter key to close this terminal ...
The same import pandas as pd runs fine if used from a command line python script from the same directory and same virtualenv. Also it runs when called via subprocess.call() from Anjuta runmode.
I am on Ubuntu 18.04 and have installed Anjuta with apt, pandas with pip install pandas.
python application-development virtualenv anjuta
add a comment |
up vote
0
down vote
favorite
I have this boilerplate in a minimal Anjuta app that runs. I do not want to install pandas to the system python path so I am using Virtualenv. When I add import pandas as pd I get the following error message.
Not sure if this is Anjuta or Pandas related. I have googled for the error message but nothing instrumental. What do I do?
#!/home/USERNAME/my_app/bin/python3.6
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GdkPixbuf, Gdk
import os, sys, gi
...
from shutil import copyfile
import pandas as pd
...
And I get this.
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
Traceback (most recent call last):
File "/home/USERNAME/my_app/src/my_app.py", line 35, in <module>
import pandas as pd
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/__init__.py", line 57, in <module>
from pandas.io.api import *
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/api.py", line 19, in <module>
from pandas.io.packers import read_msgpack, to_msgpack
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/packers.py", line 69, in <module>
from pandas.util._move import (
ValueError: module functions cannot set METH_CLASS or METH_STATIC
----------------------------------------------
Program exited with errcode (1)
Press the Enter key to close this terminal ...
without the import pandas as pd the program runs just fine...
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
/home/USERNAME/my_app/test.xlsx
----------------------------------------------
Program exited with errcode (0)
Press the Enter key to close this terminal ...
The same import pandas as pd runs fine if used from a command line python script from the same directory and same virtualenv. Also it runs when called via subprocess.call() from Anjuta runmode.
I am on Ubuntu 18.04 and have installed Anjuta with apt, pandas with pip install pandas.
python application-development virtualenv anjuta
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have this boilerplate in a minimal Anjuta app that runs. I do not want to install pandas to the system python path so I am using Virtualenv. When I add import pandas as pd I get the following error message.
Not sure if this is Anjuta or Pandas related. I have googled for the error message but nothing instrumental. What do I do?
#!/home/USERNAME/my_app/bin/python3.6
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GdkPixbuf, Gdk
import os, sys, gi
...
from shutil import copyfile
import pandas as pd
...
And I get this.
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
Traceback (most recent call last):
File "/home/USERNAME/my_app/src/my_app.py", line 35, in <module>
import pandas as pd
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/__init__.py", line 57, in <module>
from pandas.io.api import *
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/api.py", line 19, in <module>
from pandas.io.packers import read_msgpack, to_msgpack
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/packers.py", line 69, in <module>
from pandas.util._move import (
ValueError: module functions cannot set METH_CLASS or METH_STATIC
----------------------------------------------
Program exited with errcode (1)
Press the Enter key to close this terminal ...
without the import pandas as pd the program runs just fine...
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
/home/USERNAME/my_app/test.xlsx
----------------------------------------------
Program exited with errcode (0)
Press the Enter key to close this terminal ...
The same import pandas as pd runs fine if used from a command line python script from the same directory and same virtualenv. Also it runs when called via subprocess.call() from Anjuta runmode.
I am on Ubuntu 18.04 and have installed Anjuta with apt, pandas with pip install pandas.
python application-development virtualenv anjuta
I have this boilerplate in a minimal Anjuta app that runs. I do not want to install pandas to the system python path so I am using Virtualenv. When I add import pandas as pd I get the following error message.
Not sure if this is Anjuta or Pandas related. I have googled for the error message but nothing instrumental. What do I do?
#!/home/USERNAME/my_app/bin/python3.6
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GdkPixbuf, Gdk
import os, sys, gi
...
from shutil import copyfile
import pandas as pd
...
And I get this.
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
Traceback (most recent call last):
File "/home/USERNAME/my_app/src/my_app.py", line 35, in <module>
import pandas as pd
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/__init__.py", line 57, in <module>
from pandas.io.api import *
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/api.py", line 19, in <module>
from pandas.io.packers import read_msgpack, to_msgpack
File "/home/USERNAME/my_app/virtualenv_my_app/my_app/lib/python3.6/site-packages/pandas/io/packers.py", line 69, in <module>
from pandas.util._move import (
ValueError: module functions cannot set METH_CLASS or METH_STATIC
----------------------------------------------
Program exited with errcode (1)
Press the Enter key to close this terminal ...
without the import pandas as pd the program runs just fine...
EXECUTING:
/home/USERNAME/my_app/src/my_app.py
----------------------------------------------
/home/USERNAME/my_app/test.xlsx
----------------------------------------------
Program exited with errcode (0)
Press the Enter key to close this terminal ...
The same import pandas as pd runs fine if used from a command line python script from the same directory and same virtualenv. Also it runs when called via subprocess.call() from Anjuta runmode.
I am on Ubuntu 18.04 and have installed Anjuta with apt, pandas with pip install pandas.
python application-development virtualenv anjuta
python application-development virtualenv anjuta
edited Oct 7 at 14:10
asked Oct 7 at 10:30
Diego
228215
228215
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
It seems to be a problem with python 3.6; I had the same problem except I was using matlibplot, numpy and pandas with the following order:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
And it gave me the same error you got, I rearranged my import order so that it looks like:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
And now it runs well. See this github issue which is very related: https://github.com/pandas-dev/pandas/issues/23040 . Quoting the last user who posted as today named "AlfTang":
The problem is fixed it by changing pandas import order as suggested. I suspect that the cause is python3.6. When I used python 3.5.2 everything worked fine.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
It seems to be a problem with python 3.6; I had the same problem except I was using matlibplot, numpy and pandas with the following order:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
And it gave me the same error you got, I rearranged my import order so that it looks like:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
And now it runs well. See this github issue which is very related: https://github.com/pandas-dev/pandas/issues/23040 . Quoting the last user who posted as today named "AlfTang":
The problem is fixed it by changing pandas import order as suggested. I suspect that the cause is python3.6. When I used python 3.5.2 everything worked fine.
add a comment |
up vote
1
down vote
accepted
It seems to be a problem with python 3.6; I had the same problem except I was using matlibplot, numpy and pandas with the following order:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
And it gave me the same error you got, I rearranged my import order so that it looks like:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
And now it runs well. See this github issue which is very related: https://github.com/pandas-dev/pandas/issues/23040 . Quoting the last user who posted as today named "AlfTang":
The problem is fixed it by changing pandas import order as suggested. I suspect that the cause is python3.6. When I used python 3.5.2 everything worked fine.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
It seems to be a problem with python 3.6; I had the same problem except I was using matlibplot, numpy and pandas with the following order:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
And it gave me the same error you got, I rearranged my import order so that it looks like:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
And now it runs well. See this github issue which is very related: https://github.com/pandas-dev/pandas/issues/23040 . Quoting the last user who posted as today named "AlfTang":
The problem is fixed it by changing pandas import order as suggested. I suspect that the cause is python3.6. When I used python 3.5.2 everything worked fine.
It seems to be a problem with python 3.6; I had the same problem except I was using matlibplot, numpy and pandas with the following order:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
And it gave me the same error you got, I rearranged my import order so that it looks like:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
And now it runs well. See this github issue which is very related: https://github.com/pandas-dev/pandas/issues/23040 . Quoting the last user who posted as today named "AlfTang":
The problem is fixed it by changing pandas import order as suggested. I suspect that the cause is python3.6. When I used python 3.5.2 everything worked fine.
edited Nov 30 at 3:22
answered Nov 27 at 16:24
Loscil94
262
262
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1081651%2ffailing-to-import-pandas-in-anjuta-module-functions-cannot-set-meth-class-or-me%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown