Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 无法使用Python 3加载Python模块 包括 包括 包括 包括 包括 包括 包括 静态常量字符*sPythonCode= 类测试:\n 定义初始化自身:\n self.Disc=0\N def getsetself:\n self.Disc=7\N 返回self.Disc\n; 字符串写文件 { 静态int-iFile=0; std::string sFileNamestd::stringtest+std::to_stringiFile; std::ofstreamoutpy/+sFileName+.py; out_C++_Python 3.x_Cpython_Python Embedding - Fatal编程技术网

C++ 无法使用Python 3加载Python模块 包括 包括 包括 包括 包括 包括 包括 静态常量字符*sPythonCode= 类测试:\n 定义初始化自身:\n self.Disc=0\N def getsetself:\n self.Disc=7\N 返回self.Disc\n; 字符串写文件 { 静态int-iFile=0; std::string sFileNamestd::stringtest+std::to_stringiFile; std::ofstreamoutpy/+sFileName+.py; out

C++ 无法使用Python 3加载Python模块 包括 包括 包括 包括 包括 包括 包括 静态常量字符*sPythonCode= 类测试:\n 定义初始化自身:\n self.Disc=0\N def getsetself:\n self.Disc=7\N 返回self.Disc\n; 字符串写文件 { 静态int-iFile=0; std::string sFileNamestd::stringtest+std::to_stringiFile; std::ofstreamoutpy/+sFileName+.py; out,c++,python-3.x,cpython,python-embedding,C++,Python 3.x,Cpython,Python Embedding,您应该调用uuu import\uuuu'importlib。每次修改模块文件夹时,使缓存无效,让C Python知道它必须再次读取目录。您应该调用uu import\uuuuuu'importlib。每次修改模块文件夹时,使缓存无效,让C Python知道它必须再次读取目录。非常感谢!!!它修复了问题problem@p请看。如果答案解决了你的问题,接受它。非常感谢!!!它解决了问题problem@parisjohn请看。如果答案解决了你的问题,接受它。

您应该调用uuu import\uuuu'importlib。每次修改模块文件夹时,使缓存无效,让C Python知道它必须再次读取目录。

您应该调用uu import\uuuuuu'importlib。每次修改模块文件夹时,使缓存无效,让C Python知道它必须再次读取目录。

非常感谢!!!它修复了问题problem@p请看。如果答案解决了你的问题,接受它。非常感谢!!!它解决了问题problem@parisjohn请看。如果答案解决了你的问题,接受它。