If a URL or path to an html file, then parse for links to archives such as sdist (.tar.gz) or wheel (.whl) files. If a local path or file:// URL that’s a directory, then look for archives in the directory listing. Links to VCS project URLs are not supported.
您正在使用的syft版本是v0.3.0+。它不包含syft.TorchHook,因为我相信我读到那里不需要它。 使用pip install syft==0.2.9来使用syft.TorchHook()。特别是如果你正在遵循Andrew Trask,Openmined提供的安全和私人课程
请注意,如果您确实在学习该课程,OpenMine团队已经引入了一个新的更新课程。有关更多详细信息,请参见https://courses.openmined.org/courses/foundations-of-private-computation。它基于syft的更新版本
我想添加一个附加问题:如果在使用PIP install syft==0.2.9时发现以下问题
您可以参考以下方法来解决:
pip install syft -f https://download.pytorch.org/whl/torch_stable.html
原因:
并非所有PyTorch版本都可以在Python的包注册表PyPI上使用
-f:添加自定义注册表
请参阅此link
相关问题 更多 >
编程相关推荐