错误TypeError: int() argument must be a string, a bytes-like object or a number, not ‘_NoValueType‘

项目场景:

跑量子蓝鲸的时候

问题描述:

出现问题:
TypeError: int() argument must be a string, a bytes-like object or a number, not '_NoValueType’
深入查下去,往上查,查到在particlea = np.random.rand(2, 2)处发现particlea的TypeError: cannot unpack non-iterable NoneType object,test_X->whale->particlea。
可以run,但调试时在particlea = np.random.rand(2, 2)处发现particlea的
TypeError: cannot unpack non-iterable NoneType object


原因分析:

因为和另一台机子一样的代码,只是numpy版本不同,于是,将numpy 1.19.4转为numpy 1.19.1
pip install numpy==1.19.1


解决方案:

执行语句pip install numpy1.19.1
将numpy 1.19.4转为numpy 1.19.1
但是还是不懂numpy1.19.4为啥不能那样生成数组。
在执行pip install numpy
1.19.1还报错
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: ‘c:\development\python\lib\site-packages\~umpy\.libs\libopenblas.NOIJJG62EMASZ
I6NYURL6JBKM4EVBGM7.gfortran-win_amd64.dll’
Consider using the --user option or check the permissions.
于是执行pip install -U pip,还是报错:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: ‘C:\Users\george\AppData\Local\Temp\pip-uninstall-vn2kypiy\pip.exe’
Consider using the --user option or check the permissions.
看了别人的文章,https://blog.csdn.net/weixin_43939159/article/details/109165715
于是执行
python -m pip install --upgrade pip -i https://pypi.douban.com/simple --user

  • 10
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值