推荐学习书目
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 · 2757 views
    This topic created in 1329 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
        1
    RyanLin1995  
       Oct 16, 2022 via Android
    因为你的文件名跟包名重名
    willpangela
        2
    willpangela  
       Oct 17, 2022 via Android
    你有个文件的名字是 pyppeteer ,程序误认为应该从这个文件导入,所以找不到对象(怎么还骂人呢啊)
    ruanimal
        3
    ruanimal  
       Oct 17, 2022
    你们为啥不先看看书或者教程,这些都是基本问题啊
    wyzh97
        4
    wyzh97  
    OP
       Oct 17, 2022
    哦, 看来还得继续学习额
    wyzh97
        5
    wyzh97  
    OP
       Oct 17, 2022
    @willpangela 哈哈, 你这没对象就没对象吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   906 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 22:37 · PVG 06:37 · LAX 15:37 · JFK 18:37
    ♥ Do have faith in what you're doing.