No such file or directory error using pyinstaller and scrapy

前端 未结 2 1629
星月不相逢
星月不相逢 2021-02-02 04:23

I have a python script that uses scrapy and I want to make it into an exe file using pyinstaller. The exe file is generated without any error but when I open it an error occurs.

2条回答
  •  借酒劲吻你
    2021-02-02 05:09

    You can find that file in scrapy package. Go to this Path: Python/Lib/site-packages/scrapy, and you will find that file. Here are the steps that you are gonna do next:

    1. Go to the directory where your exe file is, and create a folder named scrapy.
    2. Copy VERSION and mime.types from the Path above. (If you don't copy mime.types, there will just be another no such file error. I'm just saving your time)
    3. Paste those two files to the scrapy folder you created in step 1.
    4. Now open your exe file. If No Module Error shows up, you just need to import the corresponding module in the file to which you want to use Pyinstaller.

    Good luck. :)

提交回复
热议问题