-
Notifications
You must be signed in to change notification settings - Fork 827
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
WSL 22.04 - Python 3.10 - pipenv does not work #8327
Comments
@felipecrp the virtual environment is being created but can't be activated because the interpreter is located in Sample output:
The issue is being tracked at pypa/pipenv#5075. The bug is in |
@elsaco Thank you for the response! They posted a workaround in pypa/pipenv#5075 (comment). We can run pipenv using stdlib to create de environment: $ SETUPTOOLS_USE_DISTUTILS=stdlib pipenv install Which results in the creation of the virtualenv: /usr/local/lib/python3.10/dist-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release ✔ Successfully created virtual environment! We just need to set SETUPTOOLS_USE_DISTUTILS to create the environment. Apparently, after the creation we can install packages and use pipenv. Still, there are some warnings when we run pipenv:
|
Closing since this is not a WSL issue |
Version
Microsoft Windows [Version 10.0.19044.1645]
WSL Version
Kernel Version
5.10.102.1
Distro Version
Ubuntu 22.04
Other Software
pipenv
Repro Steps
Expected Behavior
It was expected to create a pipenv environment with Python 3.10.
It works flawless in previous wsl python 20.04 and 20.10 (with python 3.10).
Actual Behavior
There is an error on pipenv and the environment is not created.
Diagnostic Logs
➜ ansible pipenv install
/home/user/.local/lib/python3.10/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/home/user/.local/lib/python3.10/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
Creating a virtualenv for this project...
Pipfile: /home/user/ansible/Pipfile
Using /usr/bin/python3 (3.10.4) to create virtualenv...
⠙ Creating virtual environment...created virtual environment CPython3.10.4.final.0-64 in 405ms
creator CPython3Posix(dest=/home/user/.local/share/virtualenvs/ansible-U3vexcod, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/user/.local/share/virtualenv)
added seed packages: pip==22.0.4, setuptools==62.1.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment!
Traceback (most recent call last):
File "/home/user/.local/bin/pipenv", line 8, in
sys.exit(cli())
File "/home/user/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/cli/options.py", line 56, in main
return super().main(*args, **kwargs, windows_expand_args=False)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/user/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/cli/command.py", line 222, in install
do_install(
File "/home/user/.local/lib/python3.10/site-packages/pipenv/core.py", line 1964, in do_install
ensure_project(
File "/home/user/.local/lib/python3.10/site-packages/pipenv/core.py", line 552, in ensure_project
ensure_virtualenv(
File "/home/user/.local/lib/python3.10/site-packages/pipenv/core.py", line 485, in ensure_virtualenv
do_create_virtualenv(
File "/home/user/.local/lib/python3.10/site-packages/pipenv/core.py", line 1012, in do_create_virtualenv
project._environment = Environment(
File "/home/user/.local/lib/python3.10/site-packages/pipenv/environment.py", line 70, in init
self._base_paths = self.get_paths()
File "/home/user/.local/lib/python3.10/site-packages/pipenv/environment.py", line 394, in get_paths
c = subprocess_run(command)
File "/home/user/.local/lib/python3.10/site-packages/pipenv/utils/processes.py", line 75, in subprocess_run
return subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 966, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.local/share/virtualenvs/ansible-U3vexcod/bin/python'
The text was updated successfully, but these errors were encountered: