Page 1 of 1

Installing bitstring

Posted: Mon Aug 20, 2018 10:55 am
by rickticktock
On my Pi at the command line I typed
pip install bitstring
then in the Python shell I typed
help ("modules")
but bitstring doesn't show in the list.
I tried on my W10 machine as well, same result. What to do?
TTFN

Re: Installing bitstring

Posted: Mon Aug 20, 2018 11:14 am
by texy
Hi and welcome to the forum.
Are you using python3 or 2.7? Looks as though you may of installed bitstring for 2.7...

Texy

Re: Installing bitstring

Posted: Mon Aug 20, 2018 11:17 am
by DirkS
In addition to the above: to make sure you install modules globally (for all users) you should use 'sudo pip install' or sudo pip3 install'

Re: Installing bitstring

Posted: Wed Sep 12, 2018 2:31 pm
by rickticktock
sudo pip3 install bitstring worked for me, thanks.
So why is there more than one version of Python in the NOOBS install? It just means that when I install some module it disappears into a pit of darkness. I should like to use 3.5.3, and delete earlier versions.
TTFN

Re: Installing bitstring

Posted: Wed Sep 12, 2018 3:01 pm
by Paeryn
rickticktock wrote:
Wed Sep 12, 2018 2:31 pm
sudo pip3 install bitstring worked for me, thanks.
So why is there more than one version of Python in the NOOBS install? It just means that when I install some module it disappears into a pit of darkness. I should like to use 3.5.3, and delete earlier versions.
TTFN
You can use Python3 perfectly fine, you just have to install your modules for Python3. Python2 is a separate entity and anything installed for it is not seen by Python3.

You definitely don't want to delete Python2 as other packages may require it (not sure if any of the main Linux tools still rely on Python2, certainly quite a lot of 3rd party tools do). In time future distros will (hopefully) have updated packages that all work with Python3, but that depends on the package's maintainers updating their own code or somebody going through every package that doesn't have updates and patching them.