Out of nowhere I was trying to run a script I'd run hundreds of times that included the module beatbox. When I ran it I got this error:
import beatbox
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
zipimport.ZipImportError: can't decompress data; zlib not available
I tried restarting, no luck. Then tried importing some basic libraries
import datetime
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named datetime
Then things started getting weirder
from bs4 import beautifulsoup
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bs4/__init__.py", line 30, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bs4/builder/__init__.py", line 1, in <module>
from collections import defaultdict
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/collections.py", line 8, in <module>
from _collections import deque, defaultdict
ImportError: No module named _collections
I have no clue what's going on, haven't done anything significant lately.
Any ideas?
Wow, scary stuff.
The solution to this was from wim above.
I downloaded the latest version of python and installed it. Everything is working normally now. I have no clue what happened but we're all good
Related
I'm using spyder 2 anaconda 2.3.0 on windows as a python IDE for python 2.7. I've been using this for a long time to code in python but suddenly I don't know what happened and it said I did not have biopython package installed, when I installed biopython using
conda -c install anaconda biopython
command, biopython started running however it broke pandas and numpy.
now when I import pandas I get this:
>>> import pandas as pd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda\lib\site-packages\pandas\__init__.py", line 13, in
<module>
"extensions first.".format(module))
ImportError: C extension: hashtable not built. If you want to import pandas
from the source directory, you may need to run 'python setup.py build_ext --
inplace' to build the C extensions first.
and then when I import numpy I get this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Anaconda\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Anaconda\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Anaconda\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Anaconda\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
I uninstalled numpy and pandas and then installed them back using pip ... still the same. I entirely unistalled anaconda and installed it back still the same errors. I really do not know what's causing this. Any help will be truly appreciated. I've been trying to fix this for the past three days and its not working out. Thanks for your time.
I'm trying to make SPI GUI.
I'm trying to use sample code in Adafruit(ft232h) but i can't run the project
Error:
Traceback (most recent call last):
File "C:/Users/Kailey/untitled/test1.py", line 1, in <module>
import Adafruit_GPIO.FT232H as FT232H
File "C:\Users\Kailey\test1\lib\site-packages\Adafruit_GPIO\FT232H.py", line 30, in <module>
import ftdi1 as ftdi
ImportError: No module named ftdi1
How can i solve this problem?
from sklearn import datasets
digits = datasets.load_digits()
print(digits)
This is the error I get when using sklearn. However, I have the module installed and updated. Is there an easy way to reinstall the module via terminal? Is there another mistake I didn't notice (ex: importing the wrong module)?
Traceback (most recent call last):
File "/Users/patrickmaynard/scikitLearn/driver/driver.py", line 11, in <module>
from sklearn import datasets
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/__init__.py", line 57, in <module>
from .base import clone
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/base.py", line 10, in <module>
from scipy import sparse
ImportError: No module named scipy
Credit goes to Evert
Even if the sklearn module is fully installed, it will not work unless the scipy module is also installed.
I get the following error when trying to import anydbm in python 2.7.6. Does anyone know whats going wrong? Appreciate your help.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/anydbm.py", line 50, in <module>
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
Try dbm it should work. I know in Python3 anydbm to dbm has been renamed.
import dbm
Reloading the information about available software in Ubuntus Software & Updates GUI fixed the problem.
I'm trying to use matplotlib but I'm getting this error saying "No Module named six". I read previous answers and installed six using pip and also tried pip install six --upgrade. But nothing worked. What could be wrong?
EDIT:
The TraceBack:
Traceback (most recent call last):
File "<string>", line 254, in run_nodebug
File "C:\Users\Akshay\Documents\Internship.py", line 290, in <module>
from matplotlib import pyplot
File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 105, in <module>
import six
ImportError: No module named six
And sorry I'm unfamiliar with the which command. I'm using Python 2.7, and the latest pip.