<p>Not sure if you can do it as they seem to be the same package.</p>
<p>For python-bitcoinlib <a href="https://pypi.python.org/pypi/bitcoin" rel="nofollow noreferrer">here</a>:</p>
<blockquote>
<p>Author: Vitalik Buterin</p>
<p>Home Page: <a href="http://github.com/vbuterin/pybitcointools" rel="nofollow noreferrer">http://github.com/vbuterin/pybitcointools</a></p>
<p>Package Index Owner: vbuterin</p>
<p>DOAP record: bitcoin-1.1.26.xml</p>
</blockquote>
<p>For pybitcointools <a href="https://pypi.python.org/pypi/pybitcointools" rel="nofollow noreferrer">here</a>:</p>
<blockquote>
<p>Author: Vitalik Buterin</p>
<p>Home Page: <a href="http://github.com/vbuterin/pybitcointools" rel="nofollow noreferrer">http://github.com/vbuterin/pybitcointools</a></p>
<p>Package Index Owner: vbuterin</p>
<p>DOAP record: pybitcointools-1.1.15.xml</p>
</blockquote>
<p>They point to the same package on github (just different versions) and running them at the same time is probably not a good idea. My guess is that Vitalik changed the python package name from pybitcointools to bitcoin when he realized the second was available.</p>
<p>That said, if you really need to use both packages, you can do something like <a href="https://stackoverflow.com/questions/6570635/installing-multiple-versions-of-a-package-with-pip">this answer</a>. Note you'll have to install manually, probably installing from source using github.</p>

CC BY-SA 3.0
2015-03-15T15:14:23.277Z
2015-03-15T15:14:23.277Z
2020-06-16T11:10:03.350Z
Jimmy Song
<p>I ended up working out how to do this using iPython. It's just a matter of changing directories in Python, which I do with this dict:</p>

<p><code>&gt;&gt;&gt; PATH</code></p>

<pre><code>{'pybtc': 'b:\\pybtc\\pybitcointools', 'python-bitcoinlib': 'b:\\pybtc\\python-bitcoinlib'}
</code></pre>

<p>For pybitcointools:</p>

<pre><code>&gt;&gt;&gt; os.chdir(PATH['pybtc'])
&gt;&gt;&gt; import bitcoin as btc
</code></pre>

<p>For python-bitcoinlib:</p>

<pre><code>&gt;&gt;&gt; os.chdir(PATH['python-bitcoinlib'])
&gt;&gt;&gt; from bitcoin.core import *
</code></pre>

<p>I'll leave it there, as <a href="https://bitcoin.stackexchange.com/a/36476/9382">Jimmy Song's answer</a> fills in the rest</p>

CC BY-SA 3.0
2015-08-11T04:41:13.660Z
2015-08-11T04:41:13.660Z
2017-04-13T12:47:34.187Z
Wizard Of Ozzie
<p>This is somewhat Python-based, but I feel it is more a Bitcoin question than a Python question.</p>

<p>The problem is running <a href="https://github.com/vbuterin/pybitcointools" rel="nofollow">pybitcointools</a> and <a href="https://github.com/petertodd/python-bitcoinlib" rel="nofollow">python-bitcoinlib</a> concurrently, as both packages use the name <code>bitcoin</code>. <a href="https://www.bountysource.com/issues/9104791-package-clash-with-https-github-com-petertodd-python-bitcoinlib" rel="nofollow">This BountySource discussion</a> sums up the issue succinctly:</p>

<blockquote>
  <p>It seems that on PyPi the name <code>bitcoin</code> is free but... (the) ... <em><code>python-bitcoinlib</code></em> package on installation uses the same name "bitcoin" as the current <em><code>pybitcointools</code></em>, and I've had them clash (one overwrote the other)</p>
</blockquote>

<p>It's also worth noting that using pip, <code>pip install pybitcointools</code> = version 1.1.15, whereas <code>pip install bitcoin</code> = version 1.1.<strong>25</strong> (newer version).</p>

<p>I generally prefer Python 2.7 but whatever solutions may be applicable just to Python 3.x would also be greatly appreciated, as using both libraries concurrently would be great.</p>

<python>
Running pybitcointools & python-bitcoinlib concurrently
Wizard Of Ozzie
# Running pybitcointools & python-bitcoinlib concurrently

(Asked by: username_0 on 2015-03-13)

This is somewhat Python-based, but I feel it is more a Bitcoin question than a Python question.

The problem is running [pybitcointools](https://github.com/vbuterin/pybitcointools) and [python-bitcoinlib](https://github.com/petertodd/python-bitcoinlib) concurrently, as both packages use the name `bitcoin`. [This BountySource discussion](https://www.bountysource.com/issues/9104791-package-clash-with-https-github-com-petertodd-python-bitcoinlib) sums up the issue succinctly:

> It seems that on PyPi the name `bitcoin` is free but... (the) ... *`python-bitcoinlib`* package on installation uses the same name "bitcoin" as the current *`pybitcointools`*, and I've had them clash (one overwrote the other)

It's also worth noting that using pip, `pip install pybitcointools` = version 1.1.15, whereas `pip install bitcoin` = version 1.1.**25** (newer version).

I generally prefer Python 2.7 but whatever solutions may be applicable just to Python 3.x would also be greatly appreciated, as using both libraries concurrently would be great.

**Tags:** python


---

## 2 answers

### Answer by username_1 on 2015-03-15. Score: 2

Not sure if you can do it as they seem to be the same package.

For python-bitcoinlib [here](https://pypi.python.org/pypi/bitcoin):

> Author: Vitalik Buterin
>
> Home Page: <http://github.com/vbuterin/pybitcointools>
>
> Package Index Owner: vbuterin
>
> DOAP record: bitcoin-1.1.26.xml

For pybitcointools [here](https://pypi.python.org/pypi/pybitcointools):

> Author: Vitalik Buterin
>
> Home Page: <http://github.com/vbuterin/pybitcointools>
>
> Package Index Owner: vbuterin
>
> DOAP record: pybitcointools-1.1.15.xml

They point to the same package on github (just different versions) and running them at the same time is probably not a good idea. My guess is that Vitalik changed the python package name from pybitcointools to bitcoin when he realized the second was available.

That said, if you really need to use both packages, you can do something like [this answer](https://stackoverflow.com/questions/6570635/installing-multiple-versions-of-a-package-with-pip). Note you'll have to install manually, probably installing from source using github.


---

### Answer by username_0 on 2015-08-11. Score: 1

I ended up working out how to do this using iPython. It's just a matter of changing directories in Python, which I do with this dict:

`>>> PATH`

```
{'pybtc': 'b:\\pybtc\\pybitcointools', 'python-bitcoinlib': 'b:\\pybtc\\python-bitcoinlib'}

```

For pybitcointools:

```
>>> os.chdir(PATH['pybtc'])
>>> import bitcoin as btc

```

For python-bitcoinlib:

```
>>> os.chdir(PATH['python-bitcoinlib'])
>>> from bitcoin.core import *

```

I'll leave it there, as [username_1's answer](https://bitcoin.stackexchange.com/a/36476/9382) fills in the rest


---

