Installing the same version of pyenv and boost_python - python

I have installed python by pyenv
$which python
/Users/whitebear/.pyenv/shims/python
$python -V
Python 3.7.9
However in /Users/whitebear/.pyenv/versions/3.7.9/lib/,there is no libboost_python**
So I installed by brew brew install python-boost.
It is installed in /usr/local/Cellar/boost-python3/1.75.0/
However there is only libboost_python39** and libboost_numpy39
My python version is 3.7.9 though.
How can I install boost_python for pyenv the same version??

Please see https://github.com/pyenv/pyenv/issues/585
You need to build boost against the python version you installed in your pyenv

Related

How do I install python 3.6.5 on my Ubuntu 19.10 that already contains python 3.7.5?

I will accept two possible solutions:
Both versions are installed side by side.
3.7.5 is removed and 3.6.5 is then installed.
For this you can use pyenv.
https://realpython.com/intro-to-pyenv/
If you have installed all packages and dependencies you can install different version like this:
pyenv install -v 3.6.5

Finding versions of Python that are available for "pyenv install"

I want to know what Python versions I could install using the pyenv install command. pyenv versions lists only installed versions and does not appear to have an option to list available versions.
How can I find out what versions of Python I can install with pyenv install?
pyenv accepts a switch to the install command to list available versions: --list, or -l for short:
$ pyenv install -l
Available versions:
2.1.3
2.2.3
2.3.7
2.4.0
2.4.1
2.4.2
...
Before running pyenv install -l, you may need to update pyenv as described here. Otherwise the list may not include the latest versions (thank you #csatt1).

Why is python 3.6.1. not available in pyenv?

According to python.org, Python 3.6.1 was released at the end of March. But:
ยป pyenv install -l | grep 3\.6\.
3.6.0a1
3.6.0a3
3.6-dev
Why is Python 3.6.1 not yet available in pyenv?
Where can I find documentation about the releases that pyenv supports? (when it was added, what is in progress, ...). The pyenv documentation does not give this information.
Is there a repository for Python releases supported by pyenv? (similar to PyPi)
If you installed pyenv via pyenv installer:
pyenv update
If you installed pyenv via Homebrew
brew upgrade pyenv
If you installed pyenv via Git:
cd $(pyenv root) && git pull
I tried pyenv update but that did not resolve the issue for me.
I had to brew update && brew upgrade pyenv before doing pyenv install 3.6.1

Use pyenv local python version with SublimeREPL

My system comes with Python 2.7.6 installed by default. I need to use v2.7.8 so I've installed it using pyenv:
pyenv install 2.7.8
and set it up as the local version in the folder where my code resides with:
cd /path_to_folder
pyenv local 2.7.8
After this, I installed all the necessary packages into v2.7.8 using pip install <package>.
If I run:
$ cd /path_to_folder
$ python
I get the 2.7.8 version and I can run my code with no issues. But if I try to build my code within Sublime 3 using the SublimeREPL package I get the default 2.7.6 version where none of the packages are installed.
How can I force SublimeREPL to build using the 2.7.8 version of Python I installed via pyenv instead of the system default 2.7.6 version?

Installing pip with correct python version

I am on shared hosting and I need to install pip with the correct python version, 2.7. To install pip, I did:
$ easy_install pip
However, after it was installed I get the following:
[dave#web1 lib]$ pip --version
pip 1.0.2 from /home/premiere/dave/financials/lib/pip-1.0.2-py2.7.egg (python 2.4)
How would I re-install pip to work on the python2.7 version, which is also installed on the machine?
[premiered#web1 ~]$ python --version
Python 2.6.6
Which is strange, since it is installing to python2.4.
You may want to create a virtualenv using -p /path/to/python-2.7.binary param, and then activate it. Then all stuff you installed using pip would be correctly into your virtualenv.
If multiple versions of python are installed on the system, then you should invoke the version you want when installing. i.e.
$ python27 easy_install pip
This creates a pip file in your path that contains the specified version of python in the hashBang line.

Categories

Resources