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

No module named 'pkgutil' #1204

Closed
erbatyr opened this issue Sep 20, 2018 · 5 comments
Closed

No module named 'pkgutil' #1204

erbatyr opened this issue Sep 20, 2018 · 5 comments

Comments

@erbatyr
Copy link

erbatyr commented Sep 20, 2018

python 3.7.0
windows 10

PS C:\Users\Ербатыр\virenvs> virtualenv majesty
Using base prefix 'c:\\users\\ербатыр\\appdata\\local\\programs\\python\\python36'
New python executable in C:\Users\Ербатыр\virenvs\majesty\Scripts\python.exe
Installing setuptools, pip, wheel...
  Complete output from command C:\Users\Ербатыр\vir...y\Scripts\python.exe - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
ModuleNotFoundError: No module named 'pkgutil'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "c:\users\ербатыр\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\ербатыр\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Ербатыр\AppData\Local\Programs\Python\Python36\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
  File "c:\users\ербатыр\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 712, in main
    symlink=options.symlink)
  File "c:\users\ербатыр\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 947, in create_environment
    download=download,
  File "c:\users\ербатыр\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 904, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "c:\users\ербатыр\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 796, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command C:\Users\Ербатыр\vir...y\Scripts\python.exe - setuptools pip wheel failed with error code 1
@polszewski
Copy link

Same with me

virtualenv venv
Using base prefix 'c:\\users\\pawełolszewski\\appdata\\local\\programs\\python\\python37-32'
New python executable in C:\repos\DET\Det.AutomatedTesting\venv\Scripts\python.exe
Installing setuptools, pip, wheel...

  Complete output from command C:\repos\DET\Det.Aut...v\Scripts\python.exe - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
ModuleNotFoundError: No module named 'pkgutil'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "c:\users\pawełolszewski\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\pawełolszewski\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\PawełOlszewski\AppData\Local\Programs\Python\Python37-32\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
  File "c:\users\pawełolszewski\appdata\local\programs\python\python37-32\lib\site-packages\virtualenv.py", line 762, in main
    symlink=options.symlink,
  File "c:\users\pawełolszewski\appdata\local\programs\python\python37-32\lib\site-packages\virtualenv.py", line 1015, in create_environment
    install_wheel(to_install, py_executable, search_dirs, download=download)
  File "c:\users\pawełolszewski\appdata\local\programs\python\python37-32\lib\site-packages\virtualenv.py", line 968, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "c:\users\pawełolszewski\appdata\local\programs\python\python37-32\lib\site-packages\virtualenv.py", line 854, in call_subprocess
    raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode))
OSError: Command C:\repos\DET\Det.Aut...v\Scripts\python.exe - setuptools pip wheel failed with error code 1

@MateuszSawicki
Copy link

MateuszSawicki commented Dec 23, 2018

Please try:
python -m venv <desired_venv_path>

@gaborbernat
Copy link
Contributor

This does not have enough information to replicate. Consider providing exact environment description, with package versions, etc. We'll reopen once that happens, thanks!

@namvera
Copy link

namvera commented Feb 12, 2019

Have the same problem today. Fixed it with removing python to 'c:\python37' from appdata. It cuz you have unicode chars in the path name.

@remyroy
Copy link

remyroy commented Apr 8, 2019

This is likely related to having non-ASCII characters in your python PATH. I just had the same issue with Windows 10 and Python 3.7.3 while python was installed in C:\Users\Rémy Roy\AppData\Local\Programs\Python\Python37-32. I reinstalled Python in C:\Python37-32 and the problem was fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants