Fireworks Newby

Having a beast of a time getting Fireworks up and running on Ubuntu 18.04.

Steps so far:

  1. installed MongoDB 4.x

  2. installed pip

  3. run sudo pip install Fireworks

  4. installed into /home/ubuntu/.local/bin

  5. this directory added to path.

  6. running lpad reset generates this error:

    ubuntu@ip-172-31-3-148:~$ lpad reset
    Traceback (most recent call last):
    File “/home/ubuntu/.local/bin/lpad”, line 7, in
    from fireworks.scripts.lpad_run import lpad
    File “/home/ubuntu/.local/lib/python2.7/site-packages/fireworks/init.py”, line 9, in
    from fireworks.core.firework import FiretaskBase, FireTaskBase, Firework, Launch, Workflow,
    File “/home/ubuntu/.local/lib/python2.7/site-packages/fireworks/core/firework.py”, line 24, in
    from monty.io import reverse_readline, zopen
    File “/home/ubuntu/.local/lib/python2.7/site-packages/monty/io.py”, line 19
    def zopen(filename: Union[str, Path], *args, **kwargs) -> IO:

What am I doing wrong?

Hey there,

It looks like you’re running python2.7 instead of 3+. I’d wager if you try any python version 3.6+ you’ll have an easier time installing everything.

Very helpful thanks. I uninstalled the Python2.7 version. Installed pip3 and reinstalled Fireworks using pip3.

This gives me another error though:

ubuntu@ip-172-31-3-148:~$ lpad reset
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 574, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 783, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (Jinja2 2.10 (/usr/lib/python3/dist-packages), Requirement.parse('Jinja2>=2.10.1'), {'flask'})

During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/bin/lpad", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3088, in <module>
        @_call_aside
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3072, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 576, in _build_master
        return cls._build_from_requirements(__requires__)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 589, in _build_from_requirements
        dists = ws.resolve(reqs, Environment())
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 783, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (Jinja2 2.10 (/usr/lib/python3/dist-packages), Requirement.parse('Jinja2>=2.10.1'), {'flask'})
1 Like

Hi @Ward_Loving,

This advice is general to installing any Python code, not just FireWorks. In general, installing a Python package should not require superuser privileges, so the sudo in sudo pip install fireworks is unnecessary.

Since different Python packages sometimes require different dependencies, and these might conflict with each other, it’s usually better to install into a clean virtualenv (or, equivalently, “conda env” if you’re using the conda package management system).

Depending on the specific Python version you’re using, there are a few ways to do this, but this should work:

python3 -m venv my_env
source my_env/bin/activate
pip install fireworks

Then lpad should be available. Regarding your specific error, I haven’t seen it before, but I suspect there’s some issue with dependency conflicts that came as a result for how python has been installed on your system.

Best,

Matt

1 Like

Excellent…I’m up and running now thanks so much.