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

已经安装成功了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 gwas 分析-plink 检查人口分层出现下面问题
  • ¥15 关于#matlab#的问题:需要 MATLAB 运行程序,对比四个多址通信方式(TDMA,FDMA,CDMA,OFDMA)的抗噪声性能
  • ¥15 有没有复现过PFENet的,如何解决?
  • ¥15 FDMA,OFDMA,TDMA 和 CDMA 系统容量对比仿真
  • ¥15 图神经网络的入侵检测
  • ¥15 工业数据采集技术+存储架构推荐
  • ¥15 GPT-SOVITS如何训练少数民族语言支持合成语音
  • ¥20 树莓派4b使用Camera Module 3时出现the system should be configured for the legacy camera stack问题
  • ¥200 GitHub开源程序配置在VScode调试
  • ¥15 爬虫保存的scv文件0kb