m0_57773311 2021-12-31 15:27 采纳率: 100%
浏览 1209
已结题

已经安装成功了tushare,但是还是出现了No module named 'tushare'

问题遇到的现象和发生背景

已经安装成功了tushare,但是还是出现了No module named 'tushare'

问题相关代码,请勿粘贴截图

import tushare as ts
ts.version

运行结果及报错内容
ModuleNotFoundError                       Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_15612/2502883367.py in <module>
----> 1 import tushare as ts
      2 ts._version_

ModuleNotFoundError: No module named 'tushare'

我的解答思路和尝试过的方法

重新安装tushare,出现

D:>pip install tushare
Requirement already satisfied: tushare in d:\lib\site-packages (1.2.78)
Requirement already satisfied: pandas in d:\lib\site-packages (from tushare) (1.3.5)
Requirement already satisfied: simplejson in d:\lib\site-packages (from tushare) (3.17.6)
Requirement already satisfied: websocket-client>=0.57.0 in d:\lib\site-packages (from tushare) (1.2.3)
Requirement already satisfied: requests in d:\lib\site-packages (from tushare) (2.26.0)
Requirement already satisfied: lxml in d:\lib\site-packages (from tushare) (4.7.1)
Requirement already satisfied: bs4 in d:\lib\site-packages (from tushare) (0.0.1)
Requirement already satisfied: beautifulsoup4 in d:\lib\site-packages (from bs4->tushare) (4.10.0)
Requirement already satisfied: pytz>=2017.3 in d:\lib\site-packages (from pandas->tushare) (2021.3)
Requirement already satisfied: python-dateutil>=2.7.3 in d:\lib\site-packages (from pandas->tushare) (2.8.2)
Requirement already satisfied: numpy>=1.21.0 in d:\lib\site-packages (from pandas->tushare) (1.21.5)
Requirement already satisfied: idna<4,>=2.5 in d:\lib\site-packages (from requests->tushare) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in d:\lib\site-packages (from requests->tushare) (1.26.7)
Requirement already satisfied: charset-normalizer~=2.0.0 in d:\lib\site-packages (from requests->tushare) (2.0.9)
Requirement already satisfied: certifi>=2017.4.17 in d:\lib\site-packages (from requests->tushare) (2021.10.8)
Requirement already satisfied: six>=1.5 in d:\lib\site-packages (from python-dateutil>=2.7.3->pandas->tushare) (1.16.0)
Requirement already satisfied: soupsieve>1.2 in d:\lib\site-packages (from beautifulsoup4->bs4->tushare) (2.3.1)

我想要达到的结果

应该怎么办啊

  • 写回答

1条回答 默认 最新

  • DarkAthena ORACLE应用及数据库设计方案咨询师 2021-12-31 15:43
    关注

    检查下本地是不是有多个python环境,比如Anaconda

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 1月8日
  • 已采纳回答 12月31日
  • 创建了问题 12月31日

悬赏问题

  • ¥15 找一个QT页面+目标识别(行人检测)的开源项目
  • ¥15 有没有整苹果智能分拣线上图像数据
  • ¥20 有没有人会这个东西的
  • ¥15 cfx考虑调整“enforce system memory limit”参数的设置
  • ¥30 航迹分离,航迹增强,误差分析
  • ¥15 Chrome Manifest扩展引用Ajax-hook库拦截请求失败
  • ¥15 用Ros中的Topic通讯方式控制小乌龟的速度,走矩形;编写订阅器代码
  • ¥15 LLM accuracy检测
  • ¥15 pycharm添加远程解释器报错
  • ¥15 如何让子窗口鼠标滚动独立,不要传递消息给主窗口