I followed the exact documentation in here
but after that importing produces the following error. I am using windows 7 and python 2.7. I have already installed scipy and matplotlib.
The error that I get is as follows:
>>> import pybrain
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pybrain\__init__.py", line 1, in <module>
from pybrain.structure.__init__ import *
File "pybrain\structure\__init__.py", line 2, in <module>
from pybrain.structure.modules.__init__ import *
File "pybrain\structure\modules\__init__.py", line 2, in <module>
from pybrain.structure.modules.gate import GateLayer, DoubleGateLayer, Multi
plicationLayer, SwitchLayer
File "pybrain\structure\modules\gate.py", line 10, in <module>
from pybrain.tools.functions import sigmoid, sigmoidPrime
File "pybrain\tools\functions.py", line 4, in <module>
from scipy.linalg import inv, det, svd, logm, expm2
File "C:\Python27\lib\site-packages\scipy\linalg\__init__.py", line 174, in <m
odule>
from .misc import *
File "C:\Python27\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
from .blas import get_blas_funcs
File "C:\Python27\lib\site-packages\scipy\linalg\blas.py", line 155, in <modul
e>
from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.
For scipy requires installing numpy+mkl. You can install this lib from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
Related
I tried using "from sklearn.decomposition import PCA" on windows python 2.7 to my program, but the result was an error and it said like this:
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
from sklearn.decomposition import PCA
File "C:\Python27\lib\site-packages\sklearn\decomposition\__init__.py", line 10, in <module>
from .kernel_pca import KernelPCA
File "C:\Python27\lib\site-packages\sklearn\decomposition\kernel_pca.py", line 14, in <module>
from ..preprocessing import KernelCenterer
File "C:\Python27\lib\site-packages\sklearn\preprocessing\__init__.py", line 8, in <module>
from .data import Binarizer
File "C:\Python27\lib\site-packages\sklearn\preprocessing\data.py", line 18, in <module>
from scipy import stats
File "C:\Python27\lib\site-packages\scipy\stats\__init__.py", line 343, in <module>
from .stats import *
File "C:\Python27\lib\site-packages\scipy\stats\stats.py", line 171, in <module>
from . import distributions
File "C:\Python27\lib\site-packages\scipy\stats\distributions.py", line 10, in <module>
from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous,
File "C:\Python27\lib\site-packages\scipy\stats\_distn_infrastructure.py", line 16, in <module>
from scipy.misc import doccer
File "C:\Python27\lib\site-packages\scipy\misc\__init__.py", line 97, in <module>
from .pilutil import *
File "C:\Python27\lib\site-packages\scipy\misc\pilutil.py", line 21, in <module>
import Image
File "C:\Python27\lib\site-packages\PIL\Image.py", line 27, in <module>
from . import VERSION, PILLOW_VERSION, _plugins
ValueError: Attempted relative import in non-package
what's wrong with that? yesterday back then, I used that "from sklearn.decomposition import PCA" to my program and there's no problem whit that. help me please
I have installed tensor flow from tensorflow website. While trying to import tensor flow its showing following error
>>>import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 75, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/core/framework/graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/__init__.py", line 37, in <module>
__import__('pkg_resources').declare_namespace(__name__)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 36, in <module>
import email.parser
File "/usr/lib/python2.7/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser
File "/usr/lib/python2.7/email/feedparser.py", line 27, in <module>
from email import message
File "/usr/lib/python2.7/email/message.py", line 16, in <module>
import email.charset
File "/usr/lib/python2.7/email/charset.py", line 13, in <module>
import email.base64mime
File "/usr/lib/python2.7/email/base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "/usr/lib/python2.7/email/utils.py", line 28, in <module>
import socket
File "/home/tamarind/socket.py", line 5, in <module>
This module provides socket operations and some related functions.
TypeError: 'module' object is not callable
I think its problem with socket please suggest. Please suggest.
It looks like /home/tamarind/socket.py is taking precedence over the python socket module. Just rename/remove that (or import TensorFlow from a different directory) and it should work. You may need to remove socket.pyc too.
I installed georasters using "pip install georasters".But I am unable to import it in python.The following error comes:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import georasters
File "D:\Python\lib\site-packages\georasters\__init__.py", line 3, in <module>
from .georasters import get_geo_info, map_pixel, map_pixel_inv, aggregate, create_geotiff, align_rasters, \
File "D:\Python\lib\site-packages\georasters\georasters.py", line 37, in <module>
import pandas as pd
File "D:\Python\lib\site-packages\pandas\__init__.py", line 25, in <module>
from pandas import hashtable, tslib, lib
File "pandas\src\numpy.pxd", line 157, in init pandas.hashtable (pandas\hashtable.c:38509)
ValueError: numpy.dtype has the wrong size, try recompiling
Kindly clarify.
I am using python tools for visual studio express 2013. I am not able to import numpy in it. Could successfully import other modules like re and math
import numpy gives following error:
Traceback (most recent call last):
File "`<stdin>`", line 1, in `<module>`
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 153, 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 8, in <module>
from .type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 6, in <module>
from . import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.
How can this be resolved?
I trying to use svm through scikit-learnkit for python. But I am continually getting following errors.
> from sklearn import svm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib64/python2.7/site-packages/sklearn/svm/__init__.py", line 13, in
<module>
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC
File "/usr/local/lib64/python2.7/site-packages/sklearn/svm/classes.py", line 1, in <module>
from .base import BaseLibLinear, BaseSVC, BaseLibSVM
File "/usr/local/lib64/python2.7/site-packages/sklearn/svm/base.py", line 6, in <module>
from . import libsvm, liblinear
ImportError: cannot import name libsvm
I have checked /usr/local/lib64/python2.7/site-packages/sklearn/svm/libsvm.so is present