Thonny报错:Traceback (most recent call last): File "<pyshell>", line 1, in <module> NameError: name 'a' is not defined

thonny的shell窗口执行python;

提示报错:

实际可以执行部分语句:

经查是由于安装python版本是32位的?,而这个软件是64的,系统也是64的

尝试卸载python;发现安装的是64位的python啊;

从thonny打开系统shell,和自己cmd打开;检查pyhon版本:发现有两个版本,位数可能也不一样:

尝试检查路径:

实际上都没问题,就该软件的这个帮助里看到是32的怪怪的,直接导致该软件的shell有问题;

具体原因查到了再更新;

Thonny报错:Traceback (most recent call last): File "<pyshell>", line 1, in <module> NameError: name 'a' is not defined

原文地址:https://www.cnblogs.com/arvin-arvin/p/11594940.html

时间: 2024-10-06 21:06:27

Thonny报错:Traceback (most recent call last): File "<pyshell>", line 1, in <module> NameError: name 'a' is not defined的相关文章

Python使用eval强制转换字符串为字典时报错:File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt; NameError: name &#39;nan&#39; is not defined

文本中保存的内容为: { 'QQQ': [0.067, 0.167, 0.2, 0.033, 0.233, 0.267, 0.1, 0.133], 'TTT': [0.5, 0.375, 0.25, 0.3, 0.6, 0.333, 0.857, 0.636, 0.667, 0.556] } 用eval转换为字符串时报错: File "test.py", line 43, in d1 data = eval(infile.readline()) File "<strin

win10中通过Anaconda安装tensorflow时报错Traceback (most recent call last): File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 360, in _error_catcher yield

问题:通过默认镜像安装,下载过程中可能会报错,下载安装失败 Traceback (most recent call last): File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 360, in _error_catcher yield File “E:\Anaconda3\lib\site-packages\pip_vendor\urllib3\response.py”, line 442, i

Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令

分区的过程正常: [[email protected] /]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot      Start         End      Blocks   Id  System /dev/sda1   *

[mysqldumpslow 报错] Died at /usr/local/mysql/bin/mysqldumpslow line 161, &lt;&gt; chunk 236.

mysqldumpslow报错:Died at /usr/local/mysql/bin/mysqldumpslow line 161, <> chunk 236. 总结:是因为top数目太多了,mysqldumpslow遍历不过来的缘故. /usr/local/mysql/bin/mysqldumpslow -s -t 15 /root/db01-102-slow.log 1,把r去掉试试,还是报错,参数不识别. [[email protected] ]# /usr/local/mysql/

python3 安装scrapy Exception: Traceback (most recent call last): File &quot;/usr/lib/python3/dist-packages/pip/req/req_install.py&quot;, line 1006, in check_if_exists解决方法

错误代码: Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists self.satisfied_by = pkg_resources.get_distribution(str(no_marker)) File "/usr/share/python-wheel

iOS Framework lipo报错 lipo: can&#39;t map input file

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't map input file: xxxFramework.framework/ (Invalid argument) 原因在与: lipo -info xxxFramework.framework 而命令需要是 lipo -info xxxFramework.framewor

Ubuntu12.04开机报错:could not update ICEauthority file /home/user/.ICEauthority 解决

产生原因:误将/home/user目录的用户变成了root,所以无法更新ICE导致开机警告 解决方法: 1.使用guest登录 2.打开一个console 3.Ctrl + Alt +F1 进入安全模式 4.使用你的用户名登录 5.sudo chown -R user:user /home/$user/.ICEauthority 或 sudo chown -R user:user /home/$user/.* user为你自己的用户名 sudo chmod 644 /home/$USER/.IC

VM虚拟机启动报错Reason Failed to lock the file怎么办

VMware启动报错Reason: Failed to lock the file的解决方法 症状:  启动VMware虚拟机的时候出现了Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file.的错误. 解决办法一: 1.在VMware该虚拟机路径下的所有.lck文件和文件夹下删除或迁移至其它目录,一般就可以解决了. 2.如果再次启动VMwar

Centos 6.5 启动DHCP报错 Can&#39;t chown new lease file: Operation not permitted

在使用centos 6.5安装DHCP时,配置已经全部ok,但在启动服务时报错 message" Can't chown new lease file: Operation not permitted" 服务无法正常启动, 在6.5中多了一个配置要修改,如下: 编辑 /etc/rc.d/init.d/dhcpd 文件,将其中的 user=dhcpd group=dhcpd 改为 user=root group=root 注: 如果不做此修改,启动DHCP时在 "/var/lo