Sunday, 25 December 2022

pipenv is not able to pickup the python versions from pyenv(pyenv-win)?

I tried using pyenv(pyenv-win) with pipenv in python. i installed some of the versions of python using pyenv but when am trying to create a virtual environment using the one of the versions which i have installed through pyenv. pipenv is not able to pickup the python versions from pyenv.

pipenv --python 3.10.6
C:\Users\MUZUB\test1>pipenv --python 3.10.6
Warning: Python 3.10.6 was not found on your system...
Would you like us to install CPython 3.10.6 with Pyenv? [Y/n]: n

Installed Pyenv Python Versions :

C:\Users\MUZUB>pyenv versions
  3.10.6
  3.10.7
  3.11.0rc2
  3.6.0
  3.7.1
  3.7.2
  3.8.1
  3.9.2
  3.9.5
* 3.9.9 (set by C:\Users\MUZUB\.pyenv\pyenv-win\version)

My default python version is 3.11

C:\Users\MUZUB\test1>python
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

when i don't specify a specific version of python .pipenv is using my default python installation to create a virtual environment.

C:\Users\MUZUB\test1>pipenv shell
Creating a virtualenv for this project...
Pipfile: C:\Users\MUZUB\test1\Pipfile
Using C:/Users/MUZUB/Desktop/python311/python.exe (3.11.1) to create virtualenv...
[    ] Creating virtual environment...created virtual environment CPython3.11.1.final.0-64 in 4715ms
  creator Venv(dest=C:\Users\MUZUB\.virtualenvs\test1-y9ytVeDV, clear=False, no_vcs_ignore=False, global=False, describe=CPython3Windows)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\MUZUB\AppData\Local\pypa\virtualenv)
    added seed packages: pip==22.3.1, setuptools==65.6.3, wheel==0.38.4
  activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

Successfully created virtual environment!
Virtualenv location: C:\Users\MUZUB\.virtualenvs\test1-y9ytVeDV
requirements.txt found in C:\Users\MUZUB instead of Pipfile! Converting...
Warning: Your Pipfile now contains pinned versions, if your requirements.txt did.
We recommend updating your Pipfile to specify the "*" version, instead.
Launching subshell in virtual environment...
Microsoft Windows [Version 10.0.22621.963]
(c) Microsoft Corporation. All rights reserved.

User Environment variables:

PYENV         C:\Users\MUZUB\.pyenv\pyenv-win\
PYENV_HOME    C:\Users\MUZUB\.pyenv\pyenv-win\
PYENV_ROOT    C:\Users\MUZUB\.pyenv\pyenv-win\versions

Path:

C:\Users\MUZUB\Desktop\python311
C:\Users\MUZUB\Desktop\python311\Scripts
C:\Users\MUZUB\.pyenv\pyenv-win\shims
C:\Users\MUZUB\.pyenv\pyenv-win\bin
C:\Users\MUZUB\.pyenv\pyenv-win\versions

I have tried changing priority in path.but it doesn't work.

iam expecting the python versions installed with pyenv be available to pipenv.



from pipenv is not able to pickup the python versions from pyenv(pyenv-win)?

No comments:

Post a Comment