During installing pandas package through command prompt
using statement - pip install pandas
I am getting an error as shown below -
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
import pandas as pd
File "C:\Users\home\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\__init__.py", line 42, in <module>
from pandas.core.api import *
File "C:\Users\home\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\core\api.py", line 10, in <module>
from pandas.core.groupby.groupby import Grouper
File "C:\Users\home\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\core\groupby\__init__.py", line 2, in <module>
from pandas.core.groupby.groupby import (
File "C:\Users\home\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\core\groupby\groupby.py", line 49, in <module>
from pandas.core.frame import DataFrame
File "C:\Users\home\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\core\frame.py", line 74, in <module>
from pandas.core.series import Series
File "C:\Users\home\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\core\series.py", line 66, in <module>
import pandas.core.ops as ops
AttributeError: module 'pandas' has no attribute 'core'
Related
I'm getting this error while running my python script on a Linux virtual machine.
Traceback (most recent call last): File "model.py",
line 7, in <module> from data_load import * File "/home/oshanjayawardanav100/biometrics-self-supervised/supervised_ucihar/data_load.py",
line 2, in <module> from sklearn.preprocessing import StandardScaler File "/opt/conda/lib/python3.7/site-packages/sklearn/__init__.py",
line 82, in <module> from .base import clone File "/opt/conda/lib/python3.7/site-packages/sklearn/base.py",
line 17, in <module> from .utils import _IS_32BIT File "/opt/conda/lib/python3.7/site-packages/sklearn/utils/__init__.py",
line 28, in <module> from .fixes import np_version, parse_version File "/opt/conda/lib/python3.7/site-packages/sklearn/utils/fixes.py",
line 20, in <module> import scipy.stats File "/opt/conda/lib/python3.7/site-packages/scipy/stats/__init__.py",
line 441, in <module> from .stats import * File "/opt/conda/lib/python3.7/site-packages/scipy/stats/stats.py",
line 43, in <module> from . import distributions File "/opt/conda/lib/python3.7/site-packages/scipy/stats/distributions.py",
line 8, in <module> from ._distn_infrastructure import (rv_discrete, rv_continuous, rv_frozen) File "/opt/conda/lib/python3.7/site-packages/scipy/stats/_distn_infrastructure.py",
line 24, in <module> from scipy import optimize File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/__init__.py",
line 400, in <module> from .optimize import * File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/optimize.py",
line 36, in <module> from ._numdiff import approx_derivative File "/opt/conda/lib/python3.7/site-packages/scipy/optimize/_numdiff.py",
line 8, in <module> from ._group_columns import group_dense, group_sparse
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by /opt/conda/lib/python3.7/site-packages/scipy/optimize/_group_columns.cpython-37m-x86_64-linux-gnu.so)`
I have no idea why I'm getting this.
I already tried this https://stackoverflow.com/a/55899959/15938633
But it is not working
I'm having this weird problem in running torchvision in macOS Catalina. Here's the traceback
Traceback (most recent call last):
File "/Users/xdriyad/PycharmProjects/Resnet/main.py", line 1, in <module>
from model import ResNet50
File "/Users/xdriyad/PycharmProjects/Resnet/model.py", line 1, in <module>
import torch
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/__init__.py", line 573, in <module>
import torch.quantization
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/quantization/__init__.py", line 9, in <module>
from .quantize_fx import *
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/quantization/quantize_fx.py", line 1, in <module>
from .fx import Fuser # noqa: F401
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/quantization/fx/__init__.py", line 1, in <module>
from .quantize import Quantizer
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/quantization/fx/quantize.py", line 2, in <module>
from torch._fx import (
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/_fx/__init__.py", line 89, in <module>
from .symbolic_trace import symbolic_trace, Tracer
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/_fx/symbolic_trace.py", line 9, in <module>
from .proxy import Proxy, _create_proxy, TracerBase
File "/Users/xdriyad/PycharmProjects/Resnet/env/lib/python3.6/site-packages/torch/_fx/proxy.py", line 7, in <module>
from typing import Tuple, Dict, Optional, Iterable, NoReturn, Any, Union, Callable
ImportError: cannot import name 'NoReturn'
import seaborn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\__init__.py", line 6, in <module>
from .rcmod import *
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\rcmod.py", line 5, in <module>
from . import palettes, _orig_rc_params
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\palettes.py", line 12, in <module>
from .utils import desaturate, set_hls_values, get_color_cycle
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\utils.py", line 7, in <module>
from scipy import stats
File "C:\Users\HP\Anaconda3\lib\site-packages\scipy\stats\__init__.py", line 345, in <module>
from .morestats import *
File "C:\Users\HP\Anaconda3\lib\site-packages\scipy\stats\morestats.py", line 12, in <module>
from numpy.testing.decorators import setastest
ModuleNotFoundError: No module named 'numpy.testing.decorators'
Welcome to Stackoverflow and Happy New Year!
I think you haven't installed numpy.testing.decorators.
Run pip install numpy and retry.
Every time I try to install any package using pip3 this error comes.
And when I open python3 in terminal and try to import string module the same error comes. I am not able to figure out any solution for it. My OS version is Ubuntu 16.04.
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 5, in <module>
import logging
File "/usr/lib/python3.5/logging/__init__.py", line 28, in <module>
from string import Template
ImportError: No module named 'string'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.5/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.5/http/client.py", line 71, in <module>
import email.parser
File "/usr/lib/python3.5/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/usr/lib/python3.5/email/feedparser.py", line 27, in <module>
from email import message
File "/usr/lib/python3.5/email/message.py", line 16, in <module>
from email import utils
File "/usr/lib/python3.5/email/utils.py", line 40, in <module>
from email.charset import Charset
File "/usr/lib/python3.5/email/charset.py", line 15, in <module>
import email.quoprimime
File "/usr/lib/python3.5/email/quoprimime.py", line 44, in <module>
from string import ascii_letters, digits, hexdigits
ImportError: No module named 'string'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 5, in <module>
import logging
File "/usr/lib/python3.5/logging/__init__.py", line 28, in <module>
from string import Template
ImportError: No module named 'string'
The problem solved since my python 3.5 directory was missing string.py file.
I've been trying to run a code with python 3.4, but getting the error mentionned below. I tried all the other solutions suggested by the others in the other topics but nothing worked.
Thanks for the help
Traceback (most recent call last):
File "C:\Users\daly\Documents\Python\Machine Learning\regression.py", line
4, in <module>
from sklearn import preprocessing, cross_validation, svm, cluster
File "C:\Python34\lib\site-packages\sklearn\__init__.py", line 134, in
<module>
from .base import clone
File "C:\Python34\lib\site-packages\sklearn\base.py", line 12, in <module>
from .utils.fixes import signature
File "C:\Python34\lib\site-packages\sklearn\utils\__init__.py", line 11, in
<module>
from .validation import (as_float_array,
File "C:\Python34\lib\site-packages\sklearn\utils\validation.py", line 18, in
<module>
from ..utils.fixes import signature
File "C:\Python34\lib\site-packages\sklearn\utils\fixes.py", line 278, in
<module>
from scipy.sparse.linalg import lsqr as sparse_lsqr
File "C:\Python34\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in <module>
from .isolve import *
File "C:\Python34\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
from .iterative import *
File "C:\Python34\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
from . import _iterative
ImportError: DLL load failed: Le module spécifié est introuvable.