当前位置: 首页 > 知识库问答 >
问题:

尝试在Mac上更新Anable

东门城
2023-03-14

我正在尝试从Ansible 2.9升级。2至2.10。我知道当前的ansible需要删除,我相信我在这方面取得了成功。文档中有几个不同的命令行(使用pip安装Ansible)。那个似乎没有出错的人使用了python3,并产生了。。。

sol:ansible sjf$ which python3
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
sol:ansible sjf$ python3 -m pip install --user ansible
Collecting ansible
  Using cached https://files.pythonhosted.org/packages/bb/09/dc8dee3f123166990bb4ca281001818fd552b4b5da56fa5cff2b47a0a0b4/ansible-2.10.1.tar.gz
Collecting ansible-base<2.11,>=2.10.2 (from ansible)
  Using cached https://files.pythonhosted.org/packages/b3/7f/2a3d935534b5b41fbde5a9fab03c3fdc7c5f94c113409ec1031ddc9bc8de/ansible-base-2.10.2.tar.gz
Collecting jinja2 (from ansible-base<2.11,>=2.10.2->ansible)
  Downloading https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl (125kB)
     |████████████████████████████████| 133kB 2.2MB/s 
Collecting PyYAML (from ansible-base<2.11,>=2.10.2->ansible)
  Downloading https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz (269kB)
     |████████████████████████████████| 276kB 18.3MB/s 
Collecting cryptography (from ansible-base<2.11,>=2.10.2->ansible)
  Downloading https://files.pythonhosted.org/packages/d3/48/99888a2c33a8addbb6c6dfeeb440425b9fbfa77cc37729d4dfde89cf0245/cryptography-3.1.1-cp35-abi3-macosx_10_10_x86_64.whl (1.8MB)
     |████████████████████████████████| 1.8MB 16.9MB/s 
Collecting packaging (from ansible-base<2.11,>=2.10.2->ansible)
  Using cached https://files.pythonhosted.org/packages/46/19/c5ab91b1b05cfe63cccd5cfc971db9214c6dd6ced54e33c30d5af1d2bc43/packaging-20.4-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2->ansible-base<2.11,>=2.10.2->ansible)
  Downloading https://files.pythonhosted.org/packages/0c/12/37f68957526d1ec0883b521934b4e1b8ff3dd8e4fab858a5bf3e487bcee9/MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl
Collecting six>=1.4.1 (from cryptography->ansible-base<2.11,>=2.10.2->ansible)
  Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography->ansible-base<2.11,>=2.10.2->ansible)
  Downloading https://files.pythonhosted.org/packages/74/9d/bfa10946bcae5d9b922fbdc244d94e89e5b5be3f7539950bc1dc43a89b6b/cffi-1.14.3-2-cp38-cp38-macosx_10_9_x86_64.whl (176kB)
     |████████████████████████████████| 184kB 4.5MB/s 
Collecting pyparsing>=2.0.2 (from packaging->ansible-base<2.11,>=2.10.2->ansible)
  Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography->ansible-base<2.11,>=2.10.2->ansible)
  Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
     |████████████████████████████████| 112kB 7.6MB/s 
Installing collected packages: MarkupSafe, jinja2, PyYAML, six, pycparser, cffi, cryptography, pyparsing, packaging, ansible-base, ansible
  Running setup.py install for PyYAML ... done
  Running setup.py install for ansible-base ... done
  Running setup.py install for ansible ... done
Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 ansible-2.10.1 ansible-base-2.10.2 cffi-1.14.3 cryptography-3.1.1 jinja2-2.11.2 packaging-20.4 pycparser-2.20 pyparsing-2.4.7 six-1.15.0
WARNING: You are using pip version 19.2.3, however version 20.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

但“which ansible”不产生输出,“ansible--version”命令未找到。

使用原始的python(2.7.16)产生...

sol:ansible sjf$ python -m pip install --user ansible
WARNING: Executing a script that is loading libcrypto in an unsafe way. This will fail in a future version of macOS. Set the LIBRESSL_REDIRECT_STUB_ABORT=1 in the environment to force this into an error.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting ansible
Collecting ansible-base<2.11,>=2.10.2 (from ansible)
Collecting packaging (from ansible-base<2.11,>=2.10.2->ansible)
  Using cached https://files.pythonhosted.org/packages/46/19/c5ab91b1b05cfe63cccd5cfc971db9214c6dd6ced54e33c30d5af1d2bc43/packaging-20.4-py2.py3-none-any.whl
Requirement already satisfied: cryptography in /Library/Python/2.7/site-packages (from ansible-base<2.11,>=2.10.2->ansible) (2.6.1)
Requirement already satisfied: jinja2 in /Library/Python/2.7/site-packages (from ansible-base<2.11,>=2.10.2->ansible) (2.10)
Requirement already satisfied: PyYAML in /Library/Python/2.7/site-packages (from ansible-base<2.11,>=2.10.2->ansible) (5.1)
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from packaging->ansible-base<2.11,>=2.10.2->ansible) (1.12.0)
Collecting pyparsing>=2.0.2 (from packaging->ansible-base<2.11,>=2.10.2->ansible)
  Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
Requirement already satisfied: enum34; python_version < "3" in /Library/Python/2.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.2->ansible) (1.1.6)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in /Library/Python/2.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.2->ansible) (1.12.2)
Requirement already satisfied: asn1crypto>=0.21.0 in /Library/Python/2.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.2->ansible) (0.24.0)
Requirement already satisfied: ipaddress; python_version < "3" in /Library/Python/2.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.2->ansible) (1.0.22)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from jinja2->ansible-base<2.11,>=2.10.2->ansible) (1.1.1)
Requirement already satisfied: pycparser in /Library/Python/2.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography->ansible-base<2.11,>=2.10.2->ansible) (2.19)
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
Installing collected packages: pyparsing, packaging, ansible-base, ansible
Successfully installed ansible-2.10.1 ansible-base-2.10.2 packaging-20.4 pyparsing-2.4.7

但仍然没有答案。你知道我错过了什么吗?

共有1个答案

劳研
2023-03-14

在macOS上,pip在~/Library/Python中安装“用户”软件包/

简单的解决方法是:

export PATH=`python3 -m site --user-base`/bin:$PATH

在这个问题中给出了更多的细节:pip成功安装包,但是在命令行中找不到可执行文件

 类似资料:
  • 问题内容: 根据此文档,我需要确保我具有1.0.1或更高版本的OpenSSL版本才能连接到Salesforce API 。 根据这个问题,我可以执行以下步骤(已成功完成) 酿造更新 酿造安装openssl 酿造链接–force openssl 运行时,我得到以下信息: 但是,当我运行时,我得到以下信息: 我从计算机中收到混合信号,但是我的salesforce模块仍然无法正常工作,因此我知道Open

  • 有人知道如何解决这个问题吗?不能在R. install.packages("devool")还安装了依赖项'ps','fs','Procexx','xopen','usethis','Call r','git2r','pkgbuild','pkgload','rcmdcheck','roxygen2' null 下载的源程序包位于“/private/var/folders/s2/cptzh4ls2

  • 我在尝试更新我的Eclipse时出错! 以下是在“安装下载0”期间发生内部错误的错误日志 Java . lang . illegalargumentexception:比较法违反了它的通用契约!at Java . util . comparabletimsort . merge hi(comparabletimsort . Java:835)at Java . util . comparablet

  • 本文向大家介绍解读golang plugin热更新尝试,包括了解读golang plugin热更新尝试的使用技巧和注意事项,需要的朋友参考一下 当我们在使用php开发的时候,基本不需要关心热更新这件事的,因为PHP本身已经帮我处理好了,只需要提交代码,PHP重新解释一遍即可。而go则是静态语言,编译后得到的是直接被机器执行的,所有代码已经翻译成相对应的机器指令并且在运行时已经加载到内存,不能动态更

  • 我正在使用laravel创建我的网站。我正在使用xampp,但无法将网站连接到服务器。。我得到以下错误。有人能帮忙吗?顺便说一下,我正在使用mac。 找不到对象!在此服务器上找不到请求的URL。如果您手动输入URL,请检查拼写并重试。 如果您认为这是服务器错误,请联系网站管理员。 错误404localhostApache/2.4.41(Unix)OpenSSL/1.1.1c PHP/7.3.9mo

  • 问题内容: 我尝试通过bash脚本执行此命令,但出现以下错误: 错误stacktrace: {“错误”:“ IndexPrimaryShardNotAllocatedException [[my_index]主要未分配后api]”,“状态”:409} {“错误”:“ ElasticSearchIllegalArgumentException [无法更新非动态设置[[index.analysis.f