AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[pandas](ubuntu)

Martin Hope
Ujjwal Kar
Asked: 2020-01-23 11:47:06 +0800 CST

当我打开终端时,我发现了这条消息。我如何解决这个问题?

  • 0

我打开终端时看到此错误。它发生在我在我的计算机上安装 open cv 和 pandas 失败之后。

在这张图片中,错误是

/home/ujjwal/anaconda3/bin/python: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,check that virtualenvwrapper has been installed for      VIRTUALENVWRAPPER_PYTHON=/home/ujjwal/anaconda3/bin/python and that PATH is set properly.

我如何解决这个问题?

python3 anaconda opencv pandas
  • 1 个回答
  • 456 Views
Martin Hope
Julia
Asked: 2019-12-31 08:35:16 +0800 CST

如何修复原生 python/pandas 问题:TypeError: 'type' 对象的描述符 '__subclasses__' 需要一个参数

  • 0

我全新安装了 Ubuntu 16.04.6,在安装了一些 python 包(如下所列)并输入 Python3 并键入import pandas后,我收到此错误:

myBashPrompt:~$ python3 
Python 3.5.2 (default, Oct  8 2019, 13:06:37) 
[GCC 5.4.0 20160609] 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/anon/.local/lib/python3.5/site-packages/pandas/__init__.py", line 55, in <module>
    from pandas.core.api import (
  File "/home/anon/.local/lib/python3.5/site-packages/pandas/core/api.py", line 5, in <module>
    from pandas.core.arrays.integer import (
  File "/home/anon/.local/lib/python3.5/site-packages/pandas/core/arrays/__init__.py", line 1, in <module>
    from .array_ import array  # noqa: F401
  File "/home/anon/.local/lib/python3.5/site-packages/pandas/core/arrays/array_.py", line 7, in <module>
    from pandas.core.dtypes.common import (
  File "/home/anon/.local/lib/python3.5/site-packages/pandas/core/dtypes/common.py", line 11, in <module>
    from pandas.core.dtypes.dtypes import (
  File "/home/anon/.local/lib/python3.5/site-packages/pandas/core/dtypes/dtypes.py", line 53, in <module>
    class Registry:
  File "/home/anon/.local/lib/python3.5/site-packages/pandas/core/dtypes/dtypes.py", line 84, in Registry
    self, dtype: Union[Type[ExtensionDtype], str]
  File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/usr/lib/python3.5/typing.py", line 512, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 1077, in __subclasscheck__
    if super().__subclasscheck__(cls):
  File "/usr/lib/python3.5/abc.py", line 225, in __subclasscheck__
    for scls in cls.__subclasses__():
TypeError: descriptor '__subclasses__' of 'type' object needs an argument 

如何解决此问题或避免此错误?
上次我发这个的时候,我以为是因为我升级了 Ubuntu。升级不是问题。这些是我安装的其他软件包。

pip3 install pygame
pip3 install pymunk
pip3 install numpy
pip3 install matplotlib==3.0.3 #installed older version because new version requires python3.6
pip3 install scipy
pip3 install PyQt5
sudo pip3 install pyqtgraph
sudo apt-get install openmpi-bin
pip3 install cntk
pip3 install h5py
sudo pip3 install keras
pip3 install visvis --user
pip3 install seaborn --user
pip3 install pandas
python 16.04 pandas
  • 1 个回答
  • 1244 Views
Martin Hope
Apoorv Patne
Asked: 2019-04-25 13:29:37 +0800 CST

如何为 python 2 而不是我的默认 python 3.6 安装 pandas?

  • 1

我想在我的 ubuntu 18.04 上为 python2 安装 pandas。

当我尝试使用安装熊猫时

pip install pandas 

我得到:

Requirement already satisfied: pandas in /home/apoorv/anaconda3/lib/python3.6/site-packages (0.24.1)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/apoorv/anaconda3/lib/python3.6/site-packages (from pandas) (2.6.0)
Requirement already satisfied: numpy>=1.12.0 in /home/apoorv/anaconda3/lib/python3.6/site-packages (from pandas) (1.15.1)
Requirement already satisfied: pytz>=2011k in /home/apoorv/.local/lib/python3.6/site-packages (from pandas) (2018.5)
Requirement already satisfied: six>=1.5 in /home/apoorv/anaconda3/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas) (1.12.0)

我得到的错误:

apoorv@apoorv:~/Desktop$ python2
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pandas
>>> 

如何安装?

python pandas
  • 1 个回答
  • 3463 Views
Martin Hope
SnowGepard
Asked: 2019-03-02 02:28:12 +0800 CST

修复依赖pandas python3

  • 1

今天我通过安装另一个包

pip3 install seaborn

这样做之后,我的熊猫包似乎坏了,我不知道如何修复它。我试图卸载并重新安装 pandas、numpy 和 seaborn,但总是得到同样的错误。

"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']

我怎样才能解决这个问题?

python3 numpy pandas
  • 1 个回答
  • 590 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve