pip bug when installing steem-python in virtualenv

in #utopian-io7 years ago (edited)

Expected behavior

In a virtulenv of python 3.6, steem-python should be installed easily after running 'pip3 install steem'. Then I can use steempy CLI correctly.

Actual behavior

There is no error in the whole installation process. However, when I run steempy, an error occured.

pkg_resources.ContextualVersionConflict: (toml 0.9.3 (/store/Environment/steem_env/lib/python3.6/site-packages), Requirement.parse('toml==0.9.3.1'), {'steem'})

It seems that pip recognizes toml 0.9.3.1 as toml 0.9.3, but steem-python requires the package to be 0.9.3.1.

How to reproduce

1.create a virtualenv with

virtualenv -p /usr/bin/python3.6/bin/python3.6 steem_env

2.activate the virtualenv

source steem_env/bin/activate

3.install steem-python with pip

pip3 install steem

4.run steempy

steempy

5.(optional) run 'pip3 list' to see the version of toml

pip3 list
  • Browser: No
  • Operating system: Ubuntu 16.04

Recording Of The Bug

2018-01-18 15-56-38屏幕截图.png
2018-01-18 15-56-45屏幕截图.png
2018-01-18 15-57-38屏幕截图.png



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Yes, I have similar problem. There was posted solution, apparently requirements.txt file need to be edited but in my case I don't have that file in site-packages folder. (also using Linux, but I'm using Python native virtual environment)

Or I'm just to inexperienced. I guess I will just have to wait until they fix this.

Thanks. I tried that fix already and in my case it didn't help.
But I got it working with this fix, I think I have read that it is @Furion's steem-python library:

pip install -U git+git://github.com/Netherdrake/steem-python

I think renaming the 0.9.3 egg file to 0.9.3.1 may work, but the inofficial library is a new solution. Thanks.

Your contribution cannot be approved because it is a duplicate. It is very similar to a contribution that was already accepted here.
Wow!
Great post sir, and welcome to utopian
thanks for posting. But it seems this was recently posted. We can't accept similar contributions. We changed our rules please take a look here
this was a nice post,Seems like you already know the bug and what caused it by checking the error log. Overall. i hope i can see more of some good dev posts like that
Thank you for contributing.
You can contact us on Discord.
[utopian-moderator]

thanks, I have solved it in a similar way.