Friday, 16 April 2021

Cannot switch Python with pyenv

Cannot switch Python with pyenv

Soma-Suzuki:~ Soma$ python --version
Python 2.7.10
Soma-Suzuki:~ Soma$ pyenv global
2.7.10
Soma-Suzuki:~ Soma$ pyenv versions
  system
* 2.7.10 (set by /Users/Soma/.pyenv/version)
  3.5.0
Soma-Suzuki:~ Soma$ pyenv global 3.5.0
Soma-Suzuki:~ Soma$ pyenv global
3.5.0
Soma-Suzuki:~ Soma$ pyenv versions
  system
  2.7.10
* 3.5.0 (set by /Users/Soma/.pyenv/version)
Soma-Suzuki:~ Soma$ python --version
Python 2.7.10
Soma-Suzuki:~ Soma$ 



$ python -V
Python 2.7.9
mac:~ $ eval "$(pyenv init -)"
mac:~ $ python -V
Python 3.5.0





Tuesday, 6 April 2021

[python] No module named pip

 On Mac using brew is a better option as apt-get is not available. Command:

brew install python

In case you have both python2 & python3 installed on machine

python2.7 -m ensurepip --default-pip

simply should solve the issue.

If instead you are missing pip from python 3 then simply change python2.7 to python3 in the command above.



Reference:

 https://stackoverflow.com/questions/18363022/importerror-no-module-named-pip


Wednesday, 19 June 2019

python ssl certificate_verify_failed

python ssl certificate_verify_failed


Solution

$ pip install --upgrade certifi
$ open /Applications/Python\ 3.6/Install\ Certificates.command



Saturday, 2 March 2019

scrapy no module named _util

scrapy no module named _util


Solution


$ sudo pip install pyopenssl --user --upgrade

Wednesday, 7 February 2018