Page MenuHomeSolus

virtualenvwrapper crashes when creating virutalenv using python3
Closed, ResolvedPublic

Description

when I am trying to create a virtualenv with python3 it crashes.

mkvirtualenv -p /usr/bin/python3 myenv

I was able to fix that by installing python3-devel.

Event Timeline

Botanium created this task.Aug 26 2016, 6:50 AM

Crashes? Need specifics, please.

sam@guestsolus ~ $ mkvirtualenv -p /usr/bin/python3 bookstore
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
Traceback (most recent call last):

File "/usr/lib/python3.5/distutils/sysconfig.py", line 433, in _init_posix
  with open(filename) as file:

FileNotFoundError: [Errno 2] No such file or directory: '/usr/include/python3.5m/pyconfig.h'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/lib/python2.7/site-packages/virtualenv.py", line 2327, in <module>
  main()
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 711, in main
  symlink=options.symlink)
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 924, in create_environment
  site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 1110, in install_python
  fix_lib64(lib_dir, symlink)
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 1523, in fix_lib64
  if not [p for p in distutils.sysconfig.get_config_vars().values()
File "/usr/lib/python3.5/distutils/sysconfig.py", line 485, in get_config_vars
  func()
File "/usr/lib/python3.5/distutils/sysconfig.py", line 440, in _init_posix
  raise DistutilsPlatformError(my_msg)

distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/include/python3.5m/pyconfig.h (No such file or directory)
sam@guestsolus ~ $

@ikey this is the output

after I installed python3-devel everything was ok, but it took me a while to find out this. :)

Seems like the solution is to add python3-devel as a rundep

Real solution is to fix our splitting

DataDrake triaged this task as Low priority.Sep 16 2016, 1:32 AM
DataDrake moved this task from Backlog to Improvement on the Software board.Oct 31 2016, 8:04 PM
DataDrake moved this task from Improvement to Package Fixes on the Software board.