[Python] Cannot import "visual" in vpython due to NumPy import error

Discussão em 'Python' iniciado por Stack, Agosto 6, 2025.

  1. Stack

    Stack Membro Participativo

    I just downloaded vPython for Python 2.7.9 and got the following error when importing the visual library:

    Traceback (most recent call last):
    File "Untitled", line 1
    from visual import *
    File "C:\Python27\Lib\site-packages\visual\__init__.py", line 3
    from visual.visual_all import * # this statement not included in vis/__init__.py
    File "C:\Python27\Lib\site-packages\visual\visual_all.py", line 10
    from visual_common.cvisual import vector
    ImportError: numpy.core.multiarray failed to import


    To avoid confusion I tried reinstalling both Python and vPython and made sure that it is the 64-bit version.

    I don't know if it's an issue with my Python27 files or if I downloaded it wrong. Does anyone know how to solve the error?

    Continue reading...

Compartilhe esta Página