how to install in virtualenv?

Asked by Kevin Brubeck Unhammer

I'd like to try out the alpha in a virtualenv, so I don't mess up things I may have installed earlier with pip. I don't know what I have installed earlier with pip, I just know something breaks each time:) After seeing https://glyph.twistedmatrix.com/2016/08/python-packaging.html I figured I should try virtualenv in the untarred release, but I get this:

$ virtualenv -p /usr/bin/python3 rpd
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/me/src/rapid-photo-downloader-0.9.0a4/rpd/bin/python3
Not overwriting existing python script /home/me/src/rapid-photo-downloader-0.9.0a4/rpd/bin/python (you must use /home/me/src/rapid-photo-downloader-0.9.0a4/rpd/bin/python3)
Installing setuptools, pkg_resources, pip, wheel...
  Complete output from command /home/me/src/r....0a4/rpd/bin/python3 - setuptools pkg_resources pip wheel:
  Collecting setuptools
  Using cached setuptools-26.0.0-py2.py3-none-any.whl
Collecting pkg_resources
Collecting pip
  Using cached pip-8.1.2-py2.py3-none-any.whl
Collecting wheel
Installing collected packages: setuptools, pkg-resources, pip, wheel
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/commands/install.py", line 335, in run
    prefix=options.prefix_path,
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_set.py", line 732, in install
    **kwargs
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_install.py", line 837, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_install.py", line 1039, in move_wheel_files
    isolated=self.isolated,
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/wheel.py", line 247, in move_wheel_files
    prefix=prefix,
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/locations.py", line 153, in distutils_scheme
    i.finalize_options()
  File "/usr/lib/python3.5/distutils/command/install.py", line 388, in finalize_options
    ('build_lib', 'build_lib'))
  File "/usr/lib/python3.5/distutils/cmd.py", line 286, in set_undefined_options
    src_cmd_obj = self.distribution.get_command_obj(src_cmd)
  File "/usr/lib/python3.5/distutils/dist.py", line 857, in get_command_obj
    self._set_command_options(cmd_obj, options)
  File "/usr/lib/python3.5/distutils/dist.py", line 901, in _set_command_options
    % (source, command_name, option))
distutils.errors.DistutilsOptionError: error in setup.cfg: command 'build' has no such option 'icons'
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.

Is it not possible to use virtualenv with rapid-photo-downloader?

Question information

Language:
English Edit question
Status:
Solved
For:
Rapid Photo Downloader Edit question
Assignee:
No assignee Edit question
Solved by:
Damon Lynch
Solved:
Last query:
Last reply:
Revision history for this message
Best Damon Lynch (dlynch3) said :
#1

It's perfectly doable but not easy, simply because you need every dependency listed here: http://damonlynch.net/rapid/download.html

BTW be wary of running commands like pip when you've untarred the Rapid Photo Downloader archive. It will pick up the setup.cfg which can cause unexpected problems of exactly the kind you've run into above.

Probably it would be a lot easier for you to use the tool pip to list what you already have installed on your system and determine if the packages Rapid Photo Downloader will upgrade or install conflict with what you already have. Do keep in mind that Rapid Photo Downloader 0.9 is installed exclusively for your user, not the system python.

So in short, before messing about with a virtualenv, consult the pip documentation to determine how to list packages. It's pretty easy to do that.

Revision history for this message
Kevin Brubeck Unhammer (unhammer) said :
#2

Thanks Damon Lynch, that solved my question.