解决 Traceback (most recent call last):File “D:\FAE\python\lib\runpy.py“, line 193

简介: 解决 Traceback (most recent call last):File “D:\FAE\python\lib\runpy.py“, line 193

问题描述:


今天执行python -m http.server命令时报以下错误

Traceback (most recent call last):
File "d:\software\python\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "d:\software\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\SoftWare\python\Scripts\pip.exe__main__.py", line 5, in


查了很久 网上大部分博主意见都是诸如此类:https://jingyan.baidu.com/article/6f2f55a19fad97f4b93e6c80.html


但是问题还是没有解决 此时想到当时安装python的版本是3.7的 想着会不会是版本过低的问题 然后换成3.9+ 问题成功解决 此处仅适用于本人 至于更详细的后续再研究


目录
相关文章
|
13天前
|
Shell Python
python中模块对象__file__
【6月更文挑战第12天】
19 8
|
27天前
|
Python
Python File(文件) 方法
Python File(文件) 方法
|
2月前
|
开发者 Python
Python File(文件) 方法
Python File(文件) 方法
|
8月前
|
Python
Python 关于模块的几点介绍 。和。。和__all__和__main___和__file__
用来定义我们导出的内容可以有哪些的一个编码方式
22 0
|
2月前
|
Python
python中 open() 和 File()
在Python中,open()是内置函数,而File是类。它们的区别和理解如下: 1. open()函数:open()函数用于打开一个文件,并返回一个文件对象。它有以下几个参数:
49 2
|
2月前
|
Shell iOS开发 MacOS
完美解决 Python library not found: libpython3.10m.dylib, Python3, .Python, lib...
完美解决 Python library not found: libpython3.10m.dylib, Python3, .Python, lib...
87 0
|
12月前
|
Python
|
12月前
|
Python
|
11月前
|
Python
Python POST data should be bytes, an iterable of bytes, or a file object. It ...
Python POST data should be bytes, an iterable of bytes, or a file object. It ...
86 0