推荐学习书目
› 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
wyzh97
V2EX  ›  Python

pycharm 导入错误(ImportError: cannot import name 'launch' from partially initialized module 'pyppeteer')

  •  
  •   wyzh97 · Oct 16, 2022 · 3158 views
    This topic created in 1484 days ago, the information mentioned may be changed or developed.

    使用 pycharm, 配置好了环境, 也安装了 pyppeteer 包, 为啥总是提示 Importerror 呢.

    Untitled.png

    我甚至把这段代码, 直接用python xxx.py运行就没有问题. pycharm 又遇到这个问题的么?

    5 replies  •  2022-10-17 17:29:33 +08:00
    RyanLin1995
    RyanLin1995
    Oct 16, 2022 via Android
    1
    因为你的文件名跟包名重名
    willpangela
    willpangela
    Oct 17, 2022 via Android
    2
    你有个文件的名字是 pyppeteer ,程序误认为应该从这个文件导入,所以找不到对象(怎么还骂人呢啊)
    ruanimal
    ruanimal
    Oct 17, 2022
    3
    你们为啥不先看看书或者教程,这些都是基本问题啊
    wyzh97
    wyzh97
    OP
    Oct 17, 2022
    4
    哦, 看来还得继续学习额
    wyzh97
    wyzh97
    OP
    Oct 17, 2022
    5
    @willpangela 哈哈, 你这没对象就没对象吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   640 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 18:37 · PVG 02:37 · LAX 10:37 · JFK 13:37
    ♥ Do have faith in what you're doing.