Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your Pipfile requires python_version 3.9, but you are using unknown (C:\Users\G\.\G\S\python.exe), none of it is true. #6062

Closed
mjzhaochenyi opened this issue Jan 19, 2024 · 1 comment
Labels
Type: Possible Bug This issue describes a possible bug in pipenv.

Comments

@mjzhaochenyi
Copy link

Issue description

When I run pipenv shell it says Pipfile requires python_version 3.9, I'm doing it in a empty folder, I don't have a Pipfile. I have no idea what "C:\Users\G.\G\S\python.exe)" is. I only have python 3.8 installed and it is in the PATH.

Expected result

Expect no issue

Actual result

Below is result when I run "pipenv shell"

PS C:\Users\Gaz C Zhao\test_pipenv> pipenv shell --python 3.8
Creating a virtualenv for this project...
Pipfile: C:\Users\Gaz C Zhao\Pipfile
Using C:/Users/Gaz C Zhao/AppData/Local/Programs/Python/Python38/python.exe (3.8.10) to create virtualenv...
[   =] Creating virtual environment...created virtual environment CPython3.8.10.final.0-64 in 31088ms
  creator CPython3Windows(dest=C:\Users\Gaz C Zhao\.virtualenvs\Gaz_C_Zhao-LTLliEGn, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Gaz C Zhao\AppData\Local\pypa\virtualenv)
    added seed packages: pip==23.2.1, setuptools==68.1.2, wheel==0.41.2
  activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

Successfully created virtual environment!
Failed to load paths: Unable to create process using 'C:\Users\Gaz C
Zhao\AppData\Local\Programs\Python\Python38\python.exe -c "import sysconfig, json; paths = {u'purelib':
u'{0}'.format(sysconfig.get_path('purelib')),u'platlib': u'{0}'.format(sysconfig.get_path('platlib')),u'stdlib':
u'{0}'.format(sysconfig.get_path('stdlib')),u'platstdlib': u'{0}'.format(sysconfig.get_path('platstdlib')),u'include':
u'{0}'.format(sysconfig.get_path('include')),u'platinclude':
u'{0}'.format(sysconfig.get_path('platinclude')),u'scripts':
u'{0}'.format(sysconfig.get_path('scripts')),u'py_version_short': u'{0}'.format(sysconfig.get_python_version()),};value
= u'{0}'.format(json.dumps(paths)); print(value)"'

Output:
Virtualenv location: C:\Users\Gaz C Zhao\.virtualenvs\Gaz_C_Zhao-LTLliEGn
Warning: Your Pipfile requires python_version 3.9, but you are using unknown (C:\Users\G\.\G\S\python.exe).
  $ pipenv --rm and rebuilding the virtual environment may resolve the issue.
  $ pipenv check will surely fail.
Launching subshell in virtual environment...

Steps to replicate

Just run "pipenv shell" in an empty folder

Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.

$ pipenv --support

Pipenv version: '2023.11.15'

Pipenv location: 'C:\\Users\\Gaz C Zhao\\AppData\\Roaming\\Python\\Python38\\site-packages\\pipenv'

Python location: 'C:\\Users\\Gaz C Zhao\\AppData\\Local\\Programs\\Python\\Python38\\python.exe'

OS Name: 'nt'

User pip version: '23.3.1'

user Python installations found:

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.10',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'platform_version': '10.0.22621',
 'python_full_version': '3.8.10',
 'python_version': '3.8',
 'sys_platform': 'win32'}

System environment variables:

  • ALLUSERSPROFILE
  • APPDATA
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • DRIVERDATA
  • HOMEDRIVE
  • HOMEPATH
  • LANG
  • LOCALAPPDATA
  • LOGONSERVER
  • NUMBER_OF_PROCESSORS
  • ONEDRIVE
  • ONEDRIVECOMMERCIAL
  • OS
  • PATH
  • PATHEXT
  • PIPENV_ACTIVE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PROMPT
  • PSMODULEPATH
  • PUBLIC
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED
  • SESSIONNAME
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TMP
  • USERDNSDOMAIN
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • VBOX_MSI_INSTALL_PATH
  • VIRTUAL_ENV
  • WINDIR
  • WSLENV
  • WT_PROFILE_ID
  • WT_SESSION
  • ZES_ENABLE_SYSMAN
  • __PSLOCKDOWNPOLICY

Pipenv–specific environment variables:

  • PIPENV_ACTIVE: 1

Debug–specific environment variables:

  • PATH: C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.1.0_x64__8wekyb3d8bbwe;C:\Users\Gaz C Zhao\.virtualenvs\Gaz_C_Zhao-LTLliEGn\Scripts;C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.1.0_x64__8wekyb3d8bbwe;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\nodejs\;C:\Program Files\dotnet\;C:\Users\Gaz C Zhao\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\Gaz C Zhao\AppData\Roaming\Python\Python38\Scripts;C:\Users\Gaz C Zhao\AppData\Local\Programs\Python\Python38\;C:\Users\Gaz C Zhao\AppData\Local\Microsoft\WindowsApps;C:\Users\Gaz C Zhao\AppData\Local\Programs\Git\cmd;C:\Program Files\Neovim\bin;C:\Program Files\Sublime Text;C:\Program Files\MySQL\MySQL Server 8.1\bin;C:\Users\Gaz C Zhao\.virtualenvs\DataPal-dOzsWDQS\Lib\site-packages\qt5_applications\Qt\bin;C:\Users\Gaz C Zhao\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Users\Gaz C Zhao\AppData\Roaming\npm;
  • LANG: en_US
  • VIRTUAL_ENV: C:\Users\Gaz C Zhao\.virtualenvs\Gaz_C_Zhao-LTLliEGn

Contents of Pipfile ('C:\Users\Gaz C Zhao\Pipfile'):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.9"
@matteius
Copy link
Member

Can you try the prototype branch that tries converts pythonfinder away from pydantic and onto vanilla dataclasses.
Would be a good check against those changes: #6065

@matteius matteius added the Type: Possible Bug This issue describes a possible bug in pipenv. label Jan 27, 2024
@matteius matteius closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Possible Bug This issue describes a possible bug in pipenv.
Projects
None yet
Development

No branches or pull requests

2 participants