我正在尝试在 PyCharm 的非 gil 版本中运行代码。如果我切换到带有 gil 的版本,一切正常。可能出什么问题了?
import pandas as pd
def func():
pd.DataFrame({'data':[1,3], 'id':[1,2]})
func()
回溯:
"F:\Installed Programs\Python 3.13.1\python3.13t.exe" "E:\проекты\свободная тренировка\main.py"
Traceback (most recent call last):
File "E:\проекты\свободная тренировка\main.py", line 1, in <module>
import pandas as pd
File "F:\Installed Programs\Python 3.13.1\Lib\site-packages\pandas\__init__.py", line 32, in <module>
raise ImportError(
"Unable to import required dependencies:\n" + "\n".join(_missing_dependencies)
)
ImportError: Unable to import required dependencies:w
numpy: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
Process finished with exit code 1
