LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   New to Python, need some assistance with virtualenv. (http://www.linuxquestions.org/questions/slackware-14/new-to-python-need-some-assistance-with-virtualenv-4175467112/)

manwichmakesameal 06-23-2013 07:14 PM

New to Python, need some assistance with virtualenv.
 
Ok, so I decided to go through the Python track at http://www.codecademy.com/. I've decided to set up my environment so I can start doing some dev work. I'm trying to set up pip, virtualenv, and virtualenvwrapper. I have my .bashrc set up with this:
Code:

export PROJECT_HOME=$HOME/Devel
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
source /usr/bin/virtualenvwrapper_lazy.sh

When I run workon, no errors or problems. When I try to run
Code:

mkvirtualenv temp
I got:
Code:

New python executable in temp/bin/python
Installing setuptools.............done.
Installing pip...............done.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/virtualenvwrapper/hook_loader.py", line 16, in <module>
    from stevedore import ExtensionManager
ImportError: No module named stevedore

So as root, I did
Code:

pip install stevedore
Now I get
Code:

New python executable in temp/bin/python
Installing setuptools.............done.
Installing pip...............done.
stevedore.extension Could not load 'user_scripts': virtualenv-clone
stevedore.extension virtualenv-clone
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 83, in _load_plugins
    invoke_kwds,
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 95, in _load_one_plugin
    plugin = ep.load()
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1953, in load
    if require: self.require(env, installer)
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1966, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: virtualenv-clone
stevedore.extension Could not load 'user_scripts': virtualenv-clone
stevedore.extension virtualenv-clone
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 83, in _load_plugins
    invoke_kwds,
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 95, in _load_one_plugin
    plugin = ep.load()
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1953, in load
    if require: self.require(env, installer)
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1966, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: virtualenv-clone
stevedore.extension Could not load 'user_scripts': virtualenv-clone
stevedore.extension virtualenv-clone
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 83, in _load_plugins
    invoke_kwds,
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 95, in _load_one_plugin
    plugin = ep.load()
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1953, in load
    if require: self.require(env, installer)
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1966, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: virtualenv-clone
stevedore.extension Could not load 'project': virtualenv-clone
stevedore.extension virtualenv-clone
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 83, in _load_plugins
    invoke_kwds,
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 95, in _load_one_plugin
    plugin = ep.load()
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1953, in load
    if require: self.require(env, installer)
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1966, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: virtualenv-clone
stevedore.extension Could not load 'user_scripts': virtualenv-clone
stevedore.extension virtualenv-clone
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 83, in _load_plugins
    invoke_kwds,
  File "/usr/lib64/python2.7/site-packages/stevedore/extension.py", line 95, in _load_one_plugin
    plugin = ep.load()
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1953, in load
    if require: self.require(env, installer)
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 1966, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: virtualenv-clone

I read that this is a certain bug discussed here, but the me-too workaround doesn't work for me. I have no /bin/activate. Any help is appreciated.

Richard Cranium 06-23-2013 08:20 PM

Why, exactly, are you messing around with the virtual environments? It's quite simple to develop python apps without that.

dugan 06-23-2013 10:24 PM

Isn't the next step obvious?

Code:

pip install virtualenv-clone


All times are GMT -5. The time now is 08:03 AM.