从命令提示符运行python文件时获取错误,但从pycharm或eclipse执行成功

时间:2017-03-07 17:42:05

标签: python eclipse python-2.7 python-3.x pycharm

从命令提示符运行python文件时出错,但是从pycharm或eclipse执行成功

  

在python模块中使用的代码Mod_UseIniAndSubIni.py是

from Camellia.Scripts import Mod_CreateWorkspace
from Camellia.Scripts import Mod_VPC_Create_FromJson
............................................
.............................................
.............................................
obj_Workspace=Mod_CreateWorkspace.cls_CreateWorkspace(self.file_IniFile_tasks)
  

以下是从命令提示符

运行时出现的错误
C:\Users\su005ku>c:\Windows\py.exe C:/Users/su005ku/PycharmProjects/Camellia/Camellia/Scripts/Mod_UseIniAndSubIni.py
Traceback (most recent call last):
  File "C:/Users/su005ku/PycharmProjects/Camellia/Camellia/Scripts/Mod_UseIniAndSubIni.py", line 10, in <module>
    from Camellia.Scripts import Mod_CreateWorkspace
ImportError: No module named 'Camellia'
  

Tried changing the directory and running but of no use. Please use this link to see the image

C:\Users\su005ku>cd C:/Users/su005ku/PycharmProjects/Camellia/Camellia

C:\Users\su005ku\PycharmProjects\Camellia\Camellia>C:\Users\su005ku\AppData\Local\Programs\Python\Python35-32\python.exe C:/Users/su005ku/PycharmProjects/Camellia/Camellia/Scripts/Mod_UseIn
    iAndSubIni.py
    Traceback (most recent call last):
      File "C:/Users/su005ku/PycharmProjects/Camellia/Camellia/Scripts/Mod_UseIniAndSubIni.py", line 10, in <module>
        from Camellia.Scripts import Mod_CreateWorkspace
    ImportError: No module named 'Camellia' 

0 个答案:

没有答案