网站制作学习网Python→正文:cannot import name 'unicode'/'int' from 'numpy'
字体:

cannot import name 'unicode'/'int' from 'numpy'

Python 2023/4/6 9:15:48  点击:不统计


 在python3.10 import numpy 时出现按了  cannot import name 'unicode'/'int' from 'numpy' 提示,原来pip install numpy 没有相关的支持了,需要自己安装。

 
首先,根据自己的python 版本 选择安装对应的numpy版本匹配的whl文件
 https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
 
其次, 删除原来pip 安装的numpy 
命令pip uninstall numpy
最后,把whl文件放在script文件夹里面,然后通过pip install [PATH] 安装numpy
上面的PATH就是你下载或则春初whl文件的实际路径地址,包含文件名称
安装后就可以使用 from xx import numpy 
 

转www.载for网站制作学习asp必.cn究

·上一篇:python 跳过Cloudflare >>    ·下一篇:python for循环 >>
推荐文章
最新文章