importing numpy package in Spyder, Python

删除回忆录丶 提交于 2021-01-29 05:48:38

问题


I'm starting to learn python. So the first thing I did was install python, in this case ubuntu 16.04 LTS, since in this system python is already installed.

As a first test, I tried to run a simple program with numpy library, but program n does not run, it displays the following error:

import sitecustomize' failed; use -v for traceback
<type 'numpy.ndarray'>

It seems to me that Spyder failed to import the numpy library, although I've already called it by the terminal and it came, that is, it's installed.

My script is as follows:

# -*- coding: utf-8 -*-
"""
Created on Tue Jan 22 07:58:47 2019

@author: David
"""

import numpy as np
a = np.array([1, 2, 3])   
print(type(a))    

Could someone please help me with this problem? Thanks in advance.

来源:https://stackoverflow.com/questions/54354796/importing-numpy-package-in-spyder-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!