推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
MagaFun
V2EX  ›  Python

为什么 Visual Studio 无法加载一个模组,但是在 Visual Stuio 下的 IPython 却能读取?

  •  
  •   MagaFun · Jun 26, 2017 · 5117 views
    This topic created in 3379 days ago, the information mentioned may be changed or developed.

    打算写一个链接推特的程序。如上代码运行调试之后显示无法找到模组( ModuleNotFoundError: No module named 'twitter')。鼠标悬浮在代码上提示「无法解析,此模块的 Intellisense 可能缺失」。但是我确实是在 Visual Studio 里安装了这个模组。

    而且第一张图下方可以看出来,模组成功加载了。请问这是什么问题?难道跟「模块:__main__」有关系?

    4 replies  •  2018-02-01 20:09:26 +08:00
    MagaFun
        1
    MagaFun  
    OP
       Jun 26, 2017
    我知道是什么问题了,大家可以不用回复了
    SeanZhaoOrZXY
        2
    SeanZhaoOrZXY  
       Jan 6, 2018
    你好,我也遇到了相同的问题,请问你后来是怎么解决的呢?
    MagaFun
        3
    MagaFun  
    OP
       Jan 20, 2018 via iPhone
    @SeanZhaoOrZXY 默认环境选错了,图上我的默认环境是 Python 3,本来应该选 Python 2 的
    SeanZhaoOrZXY
        4
    SeanZhaoOrZXY  
       Feb 1, 2018
    @MagaFun 这个问题近几天再看时消失了,原因未知。。还是多谢啦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2725 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 14:50 · PVG 22:50 · LAX 07:50 · JFK 10:50
    ♥ Do have faith in what you're doing.