On a fresh install of Raspbian 10 on Raspberry PI 3 B+, I am trying to install with Python 3.7 the numpy==1.19.5. The problem is that when I import pandas, I get this error:
pi#raspberrypi:~ $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pi/.local/lib/python3.7/site-packages/pandas/__init__.py", line 29, in <module>
from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
File "/home/pi/.local/lib/python3.7/site-packages/pandas/_libs/__init__.py", line 13, in <module>
from pandas._libs.interval import Interval
File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 44 from C header, got 40 from PyObject
If I keep the default installation of numpy==1.20.2, it works perfectly, but I have a requirement for any numpy version less than 1.20. I've tried some versions of pandas, but nothing works. I've hit a dead-end so I am asking here for help.
Related
While running smdataparallel, I see following error
# python
Python 3.6.10 |Anaconda, Inc.| (default, May 8 2020, 02:54:21)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import smdistributed.dataparallel.torch.distributed as dist
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/lib/python3.6/site-packages/smdistributed/dataparallel/__init__.py", line 16, in <module>
import smddpcommon as hc
ImportError: libc10.so: cannot open shared object file: No such file or directory
libc10.so is made available by pytorch. Hence first
import torch
and then import packages that depend on pytorch.
You can use find to locate this file. For example, find YOUR_HOME_PATH -name "*libc10.so*". For example, I found /MY_HOME_PATH/anaconda3/envs/xrnerf/lib/python3.7/site-packages/torch/lib/libc10.so in mine.
I am basically looking for a faster alternative to scipy.fftpack.fft and found pyFFTW.
However, I am about to despair since no matter what I am trying I am not getting pyFFTW to work.
What I did so far:
installed pyFFTW by means of PIP: pip install pyfftw
downloaded FFTW 3.3.5 for Windows from here
extracted the zip file and copied anything to the site-package directory of pyFFTW
As soon as I try to import pyFFTW, the following exception occurs:
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyfftw
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\Python27\lib\site-packages\pyfftw\__init__.py", line 16, in <module> from .pyfftw import (
File "__init__.pxd", line 861, in init pyfftw.pyfftw (C:\projects
\pyfftw\pyfftw\pyfftw.c:17297)
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 104, got 112
I am using numpy 1.7.1.
Any suggestions about how to fix this problem are highly appreciated.
BTW: I already tried to uninstall / install numpy and pyFFTW several times.
You need to upgrade numpy. Whatever binary you found was compiled against a too-new copy of numpy.
When I try to import PYMC installed with pip, enpgk or the canopy GUI package manager, I tried all of them and without success.
Enthought Canopy Python 2.7.9 | 64-bit | (default, Jun 30 2015, 22:40:22)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/renanpc/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pymc/__init__.py", line 30, in <module>
from .CommonDeterministics import *
File "/home/renanpc/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pymc/CommonDeterministics.py", line 21, in <module>
from .utils import safe_len, stukel_logit, stukel_invlogit, logit, invlogit, value, find_element
File "/home/renanpc/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pymc/utils.py", line 14, in <module>
from . import flib
ImportError: libgfortran.so.1: cannot open shared object file: No such file or directory
I tried to install GFORTRAN with :
~$ sudo apt-get install gfortran-4.6
but I still get the same error.
(there are other questions very similar indeed, but usually the answer has to do with Anaconda and I'm using Canopy)
Any idea of what is going on ? I can import other packages.
I want to install paramiko on win 7 32bit ,the python is 3.3 .
I can compile it,but get follow errors:
Installed c:\python33\lib\site-packages\paramiko-1.8.0-py3.3.egg
Processing dependencies for paramiko==1.8.0
Searching for pycrypto==2.6
Best match: pycrypto 2.6
Adding pycrypto 2.6 to easy-install.pth file
Using c:\python33\lib\site-packages
Finished processing dependencies for paramiko==1.8.0
C:\Users\MC\Downloads\paramiko-paramiko-v1.8.0-9-g786920a>python
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".\paramiko\__init__.py", line 62, in <module>
from .transport import SecurityOptions, Transport
File ".\paramiko\transport.py", line 68, in <module>
class SecurityOptions (object):
ValueError: 'ciphers' in __slots__ conflicts with class variable
>>>
Paramiko does not run on Python 3. Yet. I'm working on a development branch (https://github.com/dorianpula/paramiko/tree/python3-support) to add support for Python 3, and I'm working on fixing this particular issue.
I am relatively new with Python. Here is my problem:
My environment was python2.6 with MacOs 10.6.8. I recently had to update my system with Python2.7 and some other stuff (Eclipse 3.6 and GoogleAppEngine). Python works fine within Eclipse, however, I want to keep the shell-mode in being able to quickly test small stuff on the commandline. I am getting this error message, and I need this to get rid of asap:
$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> import urllib2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py",
line 92, in <module>
import httplib
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py",
line 77, in <module>
import mimetools
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/mimetools.py",
line 6, in <module>
import tempfile
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/tempfile.py",
line 34, in <module>
from random import Random as _Random
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/random.py",
line 45, in <module>
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
/lib-dynload/math.so, 2): Symbol not found: __PyLong_AsScaledDouble
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
/lib-dynload/math.so
Expected in: flat namespace
in /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/math.so
Anyway, this was the python version that my macbook was shipped with at buying time. I don't think i want to waste time on removing, re-stalling etc. an apple-approved python version. Does anybody know how I can get my system back to run properly? And why does this error occur at all? Thanks for quick help!
Try to run your new python within a virtualenv, so that it is isolated from the system install.
http://pypi.python.org/pypi/virtualenv