prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.53k stars 163 forks source link

How to install pyVim in centos 7 with pip 20.3.4 #143

Open jarviszhu123abc opened 2 years ago

jarviszhu123abc commented 2 years ago

Hi, I am using a Centos 7.9 to run some ansible playbook command for VMware installation. It is needed to install a pyVim first.

but when I run pip install pyVim or pip install setuptools --upgrade, it is failed and it suggests to upgrade pip into 21.3.1 version. But as I checked, the Centos7 was already intergrated with python 2.7.5 and the latest pip version for it is 20.3.4. it cannot be upgrade to 21.3.1.

Could you help to see how can I install the pyVim in a Centos 7 environment?

Thanks

Below are some commands I run

[root@helper esxi]# pip install pyvim Requirement already satisfied (use --upgrade to upgrade): pyvim in /usr/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): prompt_toolkit<3.1.0,>=2.0.0 in /usr/lib/python2.7/site-packages (from pyvim) Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/site-packages (from pyvim) Requirement already satisfied (use --upgrade to upgrade): pyflakes in /usr/lib/python2.7/site-packages (from pyvim) Collecting pygments (from pyvim) Using cached https://files.pythonhosted.org/packages/b7/b3/5cba26637fe43500d4568d0ee7b7362de1fb29c0e158d50b4b69e9a40422/Pygments-2.10.0.tar.gz Running setup.py (path:/tmp/pip-build-1L7Kxb/pygments/setup.py) egg_info for package pygments produced metadata for project name unknown. Fix your #egg=pyg ments fragments. Requirement already satisfied (use --upgrade to upgrade): unknown from https://files.pythonhosted.org/packages/b7/b3/5cba26637fe43500d4568d0ee7b7362de1fb29 c0e158d50b4b69e9a40422/Pygments-2.10.0.tar.gz#sha256=f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6 in /usr/lib/python2.7/site-packages (fr om pyvim) Requirement already satisfied (use --upgrade to upgrade): docopt in /usr/lib/python2.7/site-packages (from pyvim) Requirement already satisfied (use --upgrade to upgrade): wcwidth in /usr/lib/python2.7/site-packages (from prompt_toolkit<3.1.0,>=2.0.0->pyvim) Requirement already satisfied (use --upgrade to upgrade): backports.functools-lru-cache>=1.2.1; python_version < "3.2" in /usr/lib/python2.7/site-packages (f rom wcwidth->prompt_toolkit<3.1.0,>=2.0.0->pyvim) Building wheels for collected packages: unknown, unknown Running setup.py bdist_wheel for unknown ... done Stored in directory: /root/.cache/pip/wheels/bc/46/60/e3ea221488f05ced5d8808a7d03b0895515ab4ac1b136ef96c Running setup.py bdist_wheel for unknown ... error Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-1L7Kxb/unknown/setup.py';exec(compile(getattr(tok enize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpJi0eEEpip-wheel- --python-tag cp27: Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: '/tmp/pip-build-1L7Kxb/unknown/setup.py'


Failed building wheel for unknown Running setup.py clean for unknown Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-1L7Kxb/unknown/setup.py';exec(compile(getattr(tok enize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" clean --all: Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: '/tmp/pip-build-1L7Kxb/unknown/setup.py'


Failed cleaning build dir for unknown Successfully built unknown Failed to build unknown You are using pip version 20.3.4, however version 21.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

[root@helper esxi]# pip install setuptools Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages You are using pip version 20.3.4, however version 21.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. [root@helper esxi]# pip install setuptools --upgrade Collecting setuptools Downloading https://files.pythonhosted.org/packages/6a/fa/5ec0fa9095c9b72cb1c31a8175c4c6745bf5927d1045d7a70df35d54944f/setuptools-59.6.0.tar.gz (2.3MB) 100% |████████████████████████████████| 2.3MB 388kB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "setuptools/init.py", line 16, in import setuptools.version File "setuptools/version.py", line 1, in import pkg_resources File "pkg_resources/init.py", line 117 f"{v} is an invalid version and will not be supported in " ^ SyntaxError: invalid syntax

jonathanslenders commented 2 years ago

This looks like you're using python 2. Pyvim only runs on Python 3.6 or above.