steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
154 stars 99 forks source link

toml version conflict? #112

Closed sneakyness closed 6 years ago

sneakyness commented 6 years ago

Followed install guide, noticed this float by:

Requested toml==0.9.3.1 from https://pypi.python.org/packages/af/06/edd820aa8a04ba82354a841af00aa28dcde391a7759a1e34579bb33d63bf/toml-0.9.3.1.tar.gz#md5=e5d32776ced9417c4149902d56a7302f (from steem), but installing version None

pip install -U steem always seems to do this:

Collecting toml==0.9.3.1 (from steem)
...
Installing collected packages: toml
  Found existing installation: toml 0.9.3
    Uninstalling toml-0.9.3:
      Successfully uninstalled toml-0.9.3
Successfully installed toml-0.9.3

pip show toml says 0.9.3, I tried both pip install 'toml==0.9.3.1' --force-reinstall and pip install 'toml==0.9.4' --force-reinstall, the former seems to skip the .1, and the latter does not seem to satisfy steempy.

Trying to run it in any of these 3 states results in the following:

Nicholass-MacBook-Pro:sbds sneakyness$ steempy
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 664, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 981, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 872, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (toml 0.9.3 (/usr/local/lib/python3.6/site-packages), Requirement.parse('toml==0.9.3.1'), {'steem'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/steempy", line 4, in <module>
    __import__('pkg_resources').require('steem==0.18.103')
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3138, in <module>
    @_call_aside
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3122, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3151, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 666, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 679, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 867, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'toml==0.9.3.1' distribution was not found and is required by steem

How should I change this so that it functions?

sneakyness commented 6 years ago

I found this post where some seem to be editing the metadata to just accept version 0.9.3

Is there a specific reason we are using 0.9.3.1? If not, perhaps we should pick 0.9.3 or 0.9.4

sneakyness commented 6 years ago

Changed the version number in pipfile.lock to match the version of toml I had installed, after that make finished without issue and steempy seems to run fine?

crokkon commented 6 years ago

see: #117 and https://steemit.com/steem-python/@themarkymark/fix-install-issue-with-official-steem-python-library

theoreticalbts commented 6 years ago

Possible duplicate of #96

kirkins commented 6 years ago

Facing a similar issue:

philip@philip-ThinkPad-T420:~/projects/steembot$ steempy listaccounts
Traceback (most recent call last):
  File "/home/philip/miniconda3/bin/steempy", line 7, in <module>
    steem.cli.legacy()
  File "/home/philip/miniconda3/lib/python3.6/site-packages/steem/cli.py", line 83, in legacy
    version=pkg_resources.require("steem")[0].version
  File "/home/philip/miniconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 984, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/philip/miniconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 875, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (toml 0.9.3 (/home/philip/miniconda3/lib/python3.6/site-packages), Requirement.parse('toml==0.9.3.1'), {'steem'})
holgern commented 6 years ago

Can you push a new release to pypi, as it is already fixed in the github. This would be great.

holgern commented 6 years ago

You can try my conda-forge version: https://github.com/conda-forge/steem-feedstock https://utopian.io/utopian-io/@holger80/install-steem-python-easily-by-conda-forge

cyon1c commented 6 years ago

This is resolved in master on github, will be pushing a new release to pypi in due order.