Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use target-stitch with taps-fixerio due to conflicting "requests" versions #10

Closed
stengland opened this issue Apr 26, 2017 · 3 comments

Comments

@stengland
Copy link

Hi, we are trying to send fixerio data to stitch but it looks like libraries require different versions of requests so we are getting this error:

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 654, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 859, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (requests 2.12.4 (/usr/lib/python3.5/site-packages), Requirement.parse('requests==2.13.0'), {'tap-fixerio'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/tap-fixerio", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3036, in <module>
    @_call_aside
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3020, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3049, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 656, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 669, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 854, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests==2.13.0' distribution was not found and is required by tap-fixerio
usage: target-stitch [-h] [-c CONFIG] [-n]

I'm afraid I am no expert on Python/Pip version management. Is there any way around this?

Thanks

@stengland
Copy link
Author

A bit of extra context. We are running inside a docker container.

FROM iron/python:3

RUN python3 -m ensurepip && \
    rm -r /usr/lib/python*/ensurepip && \
    pip3 install --upgrade pip setuptools && \
    rm -r /root/.cache

RUN pip install target-stitch tap-fixerio
COPY ./sing.sh .

ENTRYPOINT ["sh", "sing.sh"]

sing.sh

tap-fixerio --config $CONFIG_FILE | target-stitch --config $CONFIG_FILE

@KAllan357
Copy link
Contributor

@stengland, this is an issue discussed singer-io/getting-started#21 and singer-io/getting-started#19.

What you can do is use virtualenv to setup two separate python environments and pipe the commands together like you are already doing.

@stengland
Copy link
Author

@KAllan357 Excellent thanks. I will take a look at that and hopefully that will solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants