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

import numpy 直接运行没问题,调试报错

  •  
  •   oldbird · Nov 17, 2019 · 6685 views
    This topic created in 2371 days ago, the information mentioned may be changed or developed.

    vscode 中,解释器是 anaconda 下的一个虚拟环境,py 文件中 import numpy,调试时报错: from numpy.core._multiarray_umath import ( ImportError: DLL load failed: 找不到指定的模块。 Importing the numpy c-extensions failed

    但直接运行可以正常通过, 不知道怎么回事

    3 replies    2019-11-18 11:53:09 +08:00
    ClericPy
        1
    ClericPy  
       Nov 18, 2019
    猜测解释器不一致

    import sys
    print(sys.executable)

    看看二者是不是同一个
    lovestudykid
        2
    lovestudykid  
       Nov 18, 2019
    这个不是很显然的 bug 么,失败之后,你马上再点一下调试看看。
    https://github.com/microsoft/vscode-python/issues/4300
    kcirtap
        3
    kcirtap  
       Nov 18, 2019 via iPhone
    Python 是最好的两门语言
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3012 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 06:52 · PVG 14:52 · LAX 23:52 · JFK 02:52
    ♥ Do have faith in what you're doing.