刮擦的启动项目不起作用 权限被拒绝:蜘蛛



我成功安装了Scrapy。

我在ubuntu上创建了一个虚拟环境,它位于新的windows终端上。

当我试图创建一个新项目时,我得到了这个错误

Traceback (most recent call last):
File "/mnt/d/Scrapy/venv/bin/scrapy", line 8, in <module>
sys.exit(execute())
File "/mnt/d/Scrapy/venv/lib/python3.8/site-packages/scrapy/cmdline.py", line 143, in execute
_run_print_help(parser, _run_command, cmd, args, opts)
File "/mnt/d/Scrapy/venv/lib/python3.8/site-packages/scrapy/cmdline.py", line 98, in _run_print_help
func(*a, **kw)
File "/mnt/d/Scrapy/venv/lib/python3.8/site-packages/scrapy/cmdline.py", line 151, in _run_command
cmd.run(args, opts)
File "/mnt/d/Scrapy/venv/lib/python3.8/site-packages/scrapy/commands/startproject.py", line 110, in run
self._copytree(self.templates_dir, abspath(project_dir))
File "/mnt/d/Scrapy/venv/lib/python3.8/site-packages/scrapy/commands/startproject.py", line 83, in _copytree
self._copytree(srcname, dstname)
File "/mnt/d/Scrapy/venv/lib/python3.8/site-packages/scrapy/commands/startproject.py", line 83, in _copytree
self._copytree(srcname, dstname)
File "/mnt/d/Scrapy/venv/lib/python3.8/site-packages/scrapy/commands/startproject.py", line 88, in _copytree
copystat(src, dst)
File "/usr/lib/python3.8/shutil.py", line 376, in copystat
_copyxattr(src, dst, follow_symlinks=follow)
File "/usr/lib/python3.8/shutil.py", line 326, in _copyxattr
os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)
PermissionError: [Errno 13] Permission denied: '/mnt/d/Scrapy/demo_pro/module/spiders'

Scrapy使用在WSL下的Windows文件系统上不起作用的文件属性做一些事情。

作为一种变通方法,您可以在WSL文件系统上创建项目,然后将结果复制到您想要的位置

$ cd /tmp
$ scrapy startproject demo_pro
$ cp -r demo_pro /mnt/d/Scrapy

相关内容

  • 没有找到相关文章

最新更新