I have a question regarding pipenv --three installation...

Asked 2 years ago, Updated 2 years ago, 20 views

Hello... I want to develop it in pipenv environment. I installed pipenv and python 3 in ubuntu environment using wsl...

pipenv --three command does not work (Crying) Even if I google it, I can't solve the related error... (Crying)

Below is the error log... I'd like to thank you.

kimbregas@LAPTOP-GP8TDL9R:~/project/airbnb$ ls
kimbregas@LAPTOP-GP8TDL9R:~/project/airbnb$ pipenv --three
Creating a virtualenv for this project...
Pipfile: /home/kimbregas/project/airbnb/Pipfile
Using /mnt/c/Users/Hyunjung/AppData/Local/Programs/Python/Python37/pythonw.exe (3.7.4) to create virtualenv...
⠸ ⠸ Creating virtual environment...Running virtualenv with interpreter /mnt/c/Users/Hyunjung/AppData/Local/Programs/Python/Python37/pythonw.exe

✘ Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]:   File "/home/kimbregas/.local/lib/python2.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
[pipenv.exceptions.VirtualenvCreationException]:       return f(get_current_context(), *args, **kwargs)
[pipenv.exceptions.VirtualenvCreationException]:   File "/home/kimbregas/.local/lib/python2.7/site-packages/pipenv/cli/command.py", line 208, in cli
[pipenv.exceptions.VirtualenvCreationException]:       clear=state.clear,
[pipenv.exceptions.VirtualenvCreationException]:   File "/home/kimbregas/.local/lib/python2.7/site-packages/pipenv/core.py", line 574, in ensure_project
[pipenv.exceptions.VirtualenvCreationException]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]:   File "/home/kimbregas/.local/lib/python2.7/site-packages/pipenv/core.py", line 506, in ensure_virtualenv
[pipenv.exceptions.VirtualenvCreationException]:       python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
[pipenv.exceptions.VirtualenvCreationException]:   File "/home/kimbregas/.local/lib/python2.7/site-packages/pipenv/core.py", line 935, in do_create_virtualenv
[pipenv.exceptions.VirtualenvCreationException]:       extra=[crayons.blue("{0}".format(c.err)),]
[pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call last):
  File "/home/kimbregas/.local/lib/python2.7/site-packages/virtualenv.py", line 21, in <module>
    import base64
  File "C:\Users\Hyunjung\AppData\Local\Programs\Python\Python37\lib\base64.py", line 9, in <module>
    import re
  File "C:\Users\Hyunjung\AppData\Local\Programs\Python\Python37\lib\re.py", line 143, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Failed to create virtual environment.

python

2022-09-22 14:04

1 Answers

  File "/home/kimbregas/.local/lib/python2.7/site-packages/virtualenv.py", line 21, in <module>
    import base64
  File "C:\Users\Hyunjung\AppData\Local\Programs\Python\Python37\lib\base64.py", line 9, in <module>
    import re

This part looks a little weird. I did import base64 in Python 2.7 package base64.py instead of base64 in Python 2.7 is imported. It seems that the error eventually occurred because of this.

I've never done the wsl environment, so I don't know where and how it's twisted, but I think there might be a problem with setting values such as environmental variables.


2022-09-22 14:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.