zoukankan      html  css  js  c++  java
  • 无法导入panda包解决方法

    在试图使用panda包进行数据分析时,发现导入包失败,通过以下方法尝试后解决

    报错代码:

    PS D:DEMOMathorCup est> python py.py Traceback (most recent call last): File "py.py", line 1, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas'

    使用cmd输入 以下命令
    pip install pandas -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

    弹出错误
    Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\program files\python\lib\site-packages\pip-10.0.1.dist-info\entry_points.txt' Consider using the --user option or check the permissions.

    命令最后加上 --user
    pip install pandas -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --user

    安装成功
    Successfully installed numpy-1.19.5 pandas-1.1.5 python-dateutil-2.8.1 pytz-2020.5 You are using pip version 10.0.1, however version 20.3.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

  • 相关阅读:
    有道
    excel 数据入库
    iso-8859-1 Unicode 编码
    爬虫编码问题
    WIKi 百科爬虫
    降低耦合性获取微博数据
    Python基础总结3-字符串
    Python基础总结2
    Linux常用命令04(其他命令)
    Linux常用命令03(系统信息)
  • 原文地址:https://www.cnblogs.com/implus/p/14275835.html
Copyright © 2011-2022 走看看