Fatal Python error:initsite:Failed to import the site module

简介: Fatal Python error:initsite:Failed to import the site module

新建项目的时候突然报了这个错误,然后发现新建的项目下面没有了venv文件夹,就感觉很奇怪,想测试一下环境,import一下发现报错,感觉应该是就是缺少了venv文件的问题

然后点击了这个设置,重新add了一下。

image.png

image.png

然后点击ok,就有了下面两个包了pip和setupstool,如第一图所示。

image.png


目录
相关文章
|
2月前
|
数据可视化 数据挖掘 开发者
import有什么用,python中怎么使用import
import有什么用,python中怎么使用import
34 1
|
2月前
|
Ubuntu Python
【Python】报错ModuleNotFoundError: No module named ‘XXX‘
【Python】报错ModuleNotFoundError: No module named ‘XXX‘
|
15天前
|
XML 数据格式 Python
Python的`import`用于加载模块,基础形式是`import module`,全量导入
【6月更文挑战第23天】Python的`import`用于加载模块,基础形式是`import module`,全量导入;`from module import name`选择性导入部分,减少命名空间污染;`from module import *`导入所有(不推荐),易引发冲突。别名导入如`from math import sqrt as square_root`可避免冲突。包导入用`.`,如`import xml.etree.ElementTree as ET`。
36 8
|
15天前
|
XML 数据格式 Python
在Python中,导入其他模块是通过使用import语句完成的
在Python中导入模块涉及`import`语句的不同用法:1) `import math`导入整个标准库;2) `from math import sqrt`导入单个函数;3) `import numpy as np`使用别名;4) `from random import *`导入所有(不推荐);5) `import xml.etree.ElementTree as ET`导入子模块;6) 使用`importlib.import_module()`延迟导入;7) `from .module import func`导入相对路径模块,需管理`sys.path`。
32 6
|
15天前
|
XML 数据格式 Python
Python模块导入包括:`import math`导入标准库
【6月更文挑战第23天】Python模块导入包括:`import math`导入标准库,`from math import sqrt`导入单个函数,`import numpy as np`给模块取别名,`from random import *`导入所有(不推荐),`import xml.etree.ElementTree as ET`导入子模块,`import_module('pandas')`按需导入,和使用相对路径如`from .module import func`处理项目结构。记得调整`sys.path`以包含自定义模块路径。
23 4
|
19天前
|
Python
【Python3报错】Fatal error in launcher: Unable to create process using ……
【Python3报错】Fatal error in launcher: Unable to create process using ……
|
11天前
|
Python
Python中import的机制详解
Python中import的机制详解
|
2月前
|
计算机视觉 Python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
59 2
|
2月前
|
Python
gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
94 1
|
2月前
|
Python
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win