pycharm安装ansible模块

在pycharm中通过pip install ansible==2.9时遇到报错:
error: can't copy 'lib\ansible\module_utils\ansible_release.py': doesn't exist or not a regular file

解决方法:

  1. Download the latest zip release version from github (e.g. https://github.com/ansible/ansible/archive/v2.9.2.zip). Note, must be zip version, because the tar.gz has symbolic links in it).
  2. Unzip to (e.g.) C:\Temp\ansible-2.9.2
  3. Remove the symlink dependency by changing setup.py to return immediately from _maintain_symlinks:
    def_maintain_symlinks(symlink_type, base_path): return
  4. cd C:\Temp\ansible-2.9.2
  5. c:\Python38\python.exe setup.py install
posted @ 2024-04-11 11:29  chenhuxy  阅读(2)  评论(0编辑  收藏  举报