Page MenuHomeSolus

virtualenvwrapper for python3.5
Closed, ResolvedPublic

Description

Currently when you install virtualenvwrapper, it only installs for python2.7. Can this package be updated to install to both python2.7 and python3.5 similar to how virtualenv installs? Was there an issue with virtualenvwrapper and python3.5?

virtualenv pspec_x86_64.xml:

<Files>
    <Path fileType="executable">/usr/bin</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg-info/PKG-INFO</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg-info/SOURCES.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg-info/dependency_links.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg-info/entry_points.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg-info/not-zip-safe</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg-info/top_level.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv.py</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv.pyc</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv_support/__init__.py</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv_support/__init__.pyc</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv_support/argparse-1.4.0-py2.py3-none-any.whl</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv_support/pip-8.1.2-py2.py3-none-any.whl</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv_support/setuptools-22.0.5-py2.py3-none-any.whl</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenv_support/wheel-0.29.0-py2.py3-none-any.whl</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/__pycache__/virtualenv.cpython-35.pyc</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv-15.0.3-py3.5.egg-info/PKG-INFO</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv-15.0.3-py3.5.egg-info/SOURCES.txt</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv-15.0.3-py3.5.egg-info/dependency_links.txt</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv-15.0.3-py3.5.egg-info/entry_points.txt</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv-15.0.3-py3.5.egg-info/not-zip-safe</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv-15.0.3-py3.5.egg-info/top_level.txt</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv.py</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv_support/__init__.py</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv_support/__pycache__/__init__.cpython-35.pyc</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv_support/argparse-1.4.0-py2.py3-none-any.whl</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv_support/pip-8.1.2-py2.py3-none-any.whl</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv_support/setuptools-22.0.5-py2.py3-none-any.whl</Path>
    <Path fileType="library">/usr/lib/python3.5/site-packages/virtualenv_support/wheel-0.29.0-py2.py3-none-any.whl</Path>
</Files>

virtualenvwrapper pspec_x86_64.xml:

<Files>
    <Path fileType="executable">/usr/bin</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7-nspkg.pth</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/PKG-INFO</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/SOURCES.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/dependency_links.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/entry_points.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/namespace_packages.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/pbr.json</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/requires.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/top_level.txt</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper-4.7.1-py2.7.egg-info/zip-safe</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper/hook_loader.py</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper/project.py</Path>
    <Path fileType="library">/usr/lib/python2.7/site-packages/virtualenvwrapper/user_scripts.py</Path>
</Files>

Event Timeline

drohm created this task.Nov 7 2016, 1:25 AM
drohm updated the task description. (Show Details)
yursan9 added a subscriber: yursan9.Nov 7 2016, 2:43 AM

What do you mean?
You can still make project using python 3.5.

Just pass VIRTUALENVWRAPPER_PYTHON=/path/to/python3.5 in your .bashrc..

drohm added a comment.EditedNov 7 2016, 3:43 PM

@yursan9 That's exactly what I'm doing and it fails to load virtualenvwrapper due to the files not getting loaded (during install) in the python3.5 site-packages folder.

I had similar issue. You need to install python-devel package and everything will be fine.

drohm added a comment.Nov 9 2016, 1:41 AM

@Botanium I've done that, but doesn't fix the error I'm getting.

/usr/bin/python3.5: Error while finding spec for 'virtualenvwrapper.hook_loader' (ImportError: No module named 'virtualenvwrapper')
virtualenvwrapper.sh: There was a problem running the initialization hooks. 

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.5 and that PATH is
set properly.

The VIRTUALENVWRAPPER_PYTHON is set in my .bashrc:

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.5

The site-packages folder for python3.5 doesn't have virtualenvwrapper installed, but it does for python2.7.

drohm added a comment.Nov 9 2016, 3:55 PM

Still getting error:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.5/site-packages/virtualenvwrapper/hook_loader.py", line 16, in <module>
    from stevedore import ExtensionManager
ImportError: No module named 'stevedore'
virtualenvwrapper.sh: There was a problem running the initialization hooks. 

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.5 and that PATH is
set properly.
drohm added a comment.Nov 9 2016, 4:08 PM

The only stevedore package I found was python-stevedore 1.17.1, for python2.

DataDrake reopened this task as In Progress.Nov 9 2016, 5:29 PM

Alright let's work this step by step.

I've enabled python3 for stevedore and its dependencies in unstable, then I installed python-stevedore and did the following:

Activated the wrapper commands:

$ source /usr/bin/virtualenvwrapper.sh 

Created a python3 virtualenv:

$ mkvirtualenv python3-test --python=/usr/bin/python3
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/bryan/.virtualenvs/python3-test/bin/python3
Also creating executable in /home/bryan/.virtualenvs/python3-test/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /home/bryan/.virtualenvs/python3-test/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/bryan/.virtualenvs/python3-test/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/bryan/.virtualenvs/python3-test/bin/preactivate
virtualenvwrapper.user_scripts creating /home/bryan/.virtualenvs/python3-test/bin/postactivate
virtualenvwrapper.user_scripts creating /home/bryan/.virtualenvs/python3-test/bin/get_env_details

Before I rebuild virtualenvwrapper with stevedore as a rundep, please let me know if it works for you.

DataDrake triaged this task as Normal priority.Nov 9 2016, 5:30 PM
DataDrake edited projects, added Software; removed Package Requests.
DataDrake moved this task from Backlog to Package Fixes on the Software board.
drohm added a comment.Nov 9 2016, 5:45 PM

That did the trick, thanks @DataDrake.

Alright, I'll add in python-stevedore and then close this after it rebuilds.