# Specify python version in pkg install



## jpg (Jun 28, 2020)

Hello,

Is there a way to install using pkg the latest version of a python3 package? But without having to know what is the currently installed version of python3 in the system?

I mean if I knew what is the installed version of python - let's say 3.7 - and I wanted to install pip, I could do a `pkg install py37-pip`.

But let's say I am doing this from an external script or an installer/provisioner script that doesn't know what is the installed version of python. I could probably "query" the installed python version, but I don't really like that added complexity.

An alternative is of course to use the origin and do a `pkg install devel/py-pip`, but then pkg will go and install pip for both python3 and python2 and of course python2 itself even if it wasn't in the system in the first place!


----------

