Python's scrapy has been installed. Why can't I import? It shows DLL load failed: The specified program cannot be found.

Python's scrapy has been installed. Why can't the import show DLL load failed: The specified program cannot be found. I am
learning to use the scrapy framework recently, and I need to create a main function when using it for the first time.

from scrapy.cmdline import execute
import  os
import  sys
print(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
execute(["scrapy","crawl",'jobbole'])
''' 将jobbole绑定到main函数,在这边就可以运行调试'''
''' scrapy crawl jobbole    在cmd下启动名为jobbole文件'''

When importing scrapy.cmdline import execute,
DLL load failed: The specified program cannot be found.
I have found a lot of articles but have not found a solution, but every time I enter python in the dos window, Error processing line 1 of C:\Common Software\Python\Python37\lib\site-packages\virtualenvwrapper-4.8.4-py3 will appear. 7-nspkg.pth:. So I found the file and deleted it, then deleted virtualenv and virtualenvwrapper, reinstalled, and the problem was solved. I think this may be because I installed virtualenvwrapper before because I did not consider the problem of windows. The installation commands under windows and Linux are different.
Under Windows, it is pip install virtualenvwrapper-win.
It seems that there is no need to add -win under Linux.

Insert image description here

Guess you like

Origin blog.csdn.net/qq_43767886/article/details/105289421