so I used pip v19.1.1 to install SciPy on my Raspberry Pi 3(B) running Raspbian Strech.
The installation was successful and when I tried to import scipy, I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/me/.local/lib/python3.5/site-packages/scipy/__init__.py", line 119, in <module>
from scipy._lib._ccallback import LowLevelCallable
File "/home/me/.local/lib/python3.5/site-packages/scipy/_lib/_ccallback.py", line 1, in <module>
from . import _ccallback_c
ImportError: cannot import name '_ccallback_c'
I haven't been able to find any solutions else where, including stack exchange where there is a quetsion with the same issue, but since I'm using a raspberry pi, maybe the cause would be different? I've tried all the answers over there too but none of them worked :( Any help would be greatly appreciated!
Related
I have made a few projects which run fine. A new project required me to install pip install cbpro (a module for dealing with coinbase cryptocurrency API).
After installing it, even running the simplest code throws several errors:
Input:
import cbpro
import pandas as pd
c = cbpro.PublicClient()
data = pd.DataFrame(c.get_products())
data.tail().T
Errors:
Traceback (most recent call last):
File "/Users/me/PycharmProjects/stonks/coinbase_interface.py", line 1, in <module>
import cbpro
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cbpro/__init__.py", line 1, in <module>
from cbpro.authenticated_client import AuthenticatedClient
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cbpro/authenticated_client.py", line 10, in <module>
import requests
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/__init__.py", line 63, in <module>
from . import utils
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/utils.py", line 29, in <module>
from .cookies import RequestsCookieJar, cookiejar_from_dict
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/cookies.py", line 174, in <module>
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
Secondly, when I then go to other projects that were working well, I get additional errors. Of note, those projects start with:
import pandas as pd
import requests
import json
Errors:
Traceback (most recent call last):
File "/Users/me/PycharmProjects/stonks/historical_crypto_pull.py", line 2, in <module>
import requests
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/__init__.py", line 63, in <module>
from . import utils
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/utils.py", line 29, in <module>
from .cookies import RequestsCookieJar, cookiejar_from_dict
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/cookies.py", line 174, in <module>
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
Things I've tried:
If I uninstall cbpro, then uninstall and reinstall requests, I can undo the error and am back where I started. However, I'm interested in knowing why I am encountering these errors because I'd like to actually use cbpro and know how to solve this issue in the future.
The libraries I was using were not compatible with Python 3.10. I am still at a loss for how I would inherently know that based on the errors thrown, but since then my solution was to install Python 3.9 and see if I still get the same errors when running 3.9.
(Then I also read that it might be a better idea for my current purposes to use a slightly older version of Python, so I moved over to 3.9 completely and haven't had the same issue again.)
I am using Python3.6 on CentOS linux and have created virtual environment using venv. I installed matplotlib using pip install matplotlib and it completed successfully. Now when I am trying to import matplotlib in python command line it is producing Import Error:
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/yogeshs/Python3.6VE/lib/python3.6/site-packages/matplotlib/__init__.py", line 127, in <module>
from . import cbook
File "/home/yogeshs/Python3.6VE/lib/python3.6/site-packages/matplotlib/cbook/__init__.py", line 13, in <module>
import bz2
ImportError: dynamic module does not define module export function (PyInit_bz2)
>>>
I read almost all the answers on similar issues on Stackoverflow and tried to follow the steps but I am unable to to resolve this problem. Can somebody please guide me through this? Thank you in advance.
I am attempting to write a program that can pair to a game console via bluetooth and act as a controller for it. In order to do this, I have tried to install PyBlueZ, but I can get no further than import bluetooth, because it displays this error on my screen:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import bluetooth
File "C:\Python35\lib\bluetooth\__init__.py", line 39, in <module>
from bluetooth.msbt import *
File "C:\Python35\lib\bluetooth\msbt.py", line 2, in <module>
import bluetooth._msbt as bt
ImportError: No module named 'bluetooth._msbt'
Is this because of an error in my installation, or is the module just broken? In either case, is there a fix?
I'm going to preface this by saying that I'm relatively new to Python and so please forgive me if I have difficulty understanding something.
I've recently been trying to install OpenCV on my computer following the "Installing OpenCV from prebuilt binaries" instructions found here:
http://docs.opencv.org/3.1.0/d5/de5/tutorial_py_setup_in_windows.html#gsc.tab=0
I initially tried to install OpenCV by itself, as I already had Python 3.5 and a working version of numpy. However, my attempts to import cv2 failed, and I eventually decided to uninstall Python and follow all the steps listed on the website. However, I now have this error when I try import numpy:
Traceback (most recent call last):
File "C:/PythonProgramming/SLIC/src/SLICAlgorithm.py", line 1, in <module>
import numpy
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 180, in <module>
from . import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
from type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 20, in <module>
import function_base
File "C:\Python27\lib\site-packages\numpy\core\function_base.py", line 6, in <module>
from .numeric import result_type, NaN, shares_memory, MAY_SHARE_BOUNDS, TooHardError
ImportError: cannot import name shares_memory
Process finished with exit code 1
Other people online seem to have no problem with these instructions, or at least not with numpy. What does this error mean, and what can I do to fix it? I have a 64-bit version of Windows 10 and am working in PyCharm. All help you can provide would be much appreciated.
same problem, the following fix worked for me
pip install -I numpy --force-reinstall
I'm trying to install dataplicity in my Raspberry Pi, in order to perform a little home made project of domotics.
Can you help me?
There are two kinds of errors while installation process:
First:
ImportError: cannot import name develop
Second:
ImportError: No module named rc.manager
In order to help you to understand what's going on, I'm posting the coding that cointains the errors:
[....] Starting dataplicity...: dataplicityTraceback (most recent call last):
File "/usr/local/bin/dataplicity", line 2, in <module>
from dataplicity.app import App
File "/usr/local/lib/python2.7/dist-packages/dataplicity/app/__init__.py", line 1, in <module>
from dataplicity.app.app import App
File "/usr/local/lib/python2.7/dist-packages/dataplicity/app/app.py", line 9, in <module>
from dataplicity.client import Client
File "/usr/local/lib/python2.7/dist-packages/dataplicity/client/__init__.py", line 1, in <module>
from .client import Client
File "/usr/local/lib/python2.7/dist-packages/dataplicity/client/client.py", line 7, in <module>
from dataplicity.rc.manager import RCManager
ImportError: No module named rc.manager
This bug has now been fixed in dataplicity v 0.3.9.1. You can update by using:
pip install -U dataplicity
Or running the auto installer again.