MacBookPro:~ mac$ Scrapy
Traceback (most recent call last):
File "/anaconda3/bin/Scrapy", line 11, in <module>
sys.exit(execute())
File "/anaconda3/lib/python3.7/site-packages/scrapy/cmdline.py", line 110, in execute
settings = get_project_settings()
File "/anaconda3/lib/python3.7/site-packages/scrapy/utils/project.py", line 68, in get_project_settings
settings.setmodule(settings_module_path, priority='project')
File "/anaconda3/lib/python3.7/site-packages/scrapy/settings/__init__.py", line 292, in setmodule
module = import_module(module)
File "/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named '${project_name}'
MacBookPro:~ mac$
我想在Mac上运行Scrapy,但是这个问题困扰了我很长时间,并且从未解决过。
我尝试过
1,重新安装Python3.x并升级pip。
2,xcode-select --install
3,使用virtualenv创建一个新环境。
4,使用anaconda3创建一个新环境。
但是这个问题无法解决,因为我更新了macOS 10.14.1吗? 谢谢您的帮助。