עמי*_*זון 3 python pycharm python-3.x
我正在尝试在 Pycharm 中安装用于 python 的对象检测或 imageai。我执行了所有安装方法,但这显示了错误ModuleNotFoundError: No module named \'imageai\'
这是我的代码
\n\nfrom imageai.Prediction import ImagePrediction\nimport os\nexecution_path = os.getcwd()\n\n\nprediction = ImagePrediction()\nprediction.setModelTypeAsResNet()\nprediction.setModelPath(os.path.join(execution_path, "resnet50_weights_tf_dim_ordering_tf_kernels.h5"))\nprediction.loadModel()\n\n\npredictions, probabilities = prediction.predictImage(os.path.join(execution_path, "1.jpg"), result_count=5 )\nfor eachPrediction, eachProbability in zip(predictions, probabilities):\n    print(eachPrediction , " : " , eachProbability)\nRun Code Online (Sandbox Code Playgroud)\n\n我需要做什么来修复它?\n我是 python 新手,请帮助我。
\n\n输出
\n\n Traceback (most recent call last):\n  File "C:/Python37/files/FirstPrediction/FirstPrediction.py", line 1, in <module>\n    from imageai.Prediction import ImagePrediction\nModuleNotFoundError: No module named \'imageai\'\nRun Code Online (Sandbox Code Playgroud)\n\nC:\\Users\\\xd7\x9e\xd7\xa9\xd7\xaa\xd7\x9e\xd7\xa9>pip show imageai\nName: imageai\nVersion: 2.0.2\nSummary: A flexible Computer Vision and Deep Learning library for applications and systems.\nHome-page: https://moses.specpal.science\nAuthor: Moses Olafenwa and John Olafenwa\nAuthor-email: UNKNOWN\nLicense: MIT\nLocation: c:\\python37\\lib\\site-packages\nRequires:\nRequired-by:\nRun Code Online (Sandbox Code Playgroud)\n\nC:\\Users\\\xd7\x9e\xd7\xa9\xd7\xaa\xd7\x9e\xd7\xa9>pip -V\npip 18.1 from c:\\python37\\lib\\site-packages\\pip (python 3.7)\nRun Code Online (Sandbox Code Playgroud)\n
    小智 5
您首先需要从此处下载此 ImageAI whl 文件。 https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.2/imageai-2.0.2-py3-none-any.whl
运行以下
pip install imageai-2.0.2-py3-none-any.whl
Run Code Online (Sandbox Code Playgroud)
        |   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           15797 次  |  
        
|   最近记录:  |