I was trying to install preview-generator and so I typed pip install preview-generator
and I got this: ERROR: Package 'preview-generator' requires a different Python: 2.7.16 not in '>= 3.4'
so I tried pip install -U pip
and it said that Requirement already up-to-date: pip in ./.local/lib/python2.7/site-packages (20.3.4)
so how would I update it?
Edit: I tried pip3 install preview-generator
and it worked
My suggestion is: don't mess your system's python installation. There might be other modules that depend on that being what it is. Use pyenv
to manage python versions.
Check https://github.com/pyenv/pyenv
Check this post for a detailed explanation: https://realpython.com/intro-to-pyenv/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.