简体   繁体   中英

How to import numpy in Pycharm

After installing numpy in PyCharm, how do you import it?.

After importing it and defining a function I got the error:

[ 在此处输入图片说明

you should import numpy in the codes and usually rename it as np. add code below like this.

import numpy as np 

花了很长时间才找到这个解决方案,创建一个虚拟环境,然后在您可以舒适地安装包管理器 pip 或 pip3 之后: import numpy as np

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM