rickticktock
Posts: 13
Joined: Mon Aug 20, 2018 10:13 am

Installing bitstring

Mon Aug 20, 2018 10:55 am

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

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Installing bitstring

Mon Aug 20, 2018 11:14 am

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
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

DirkS
Posts: 9964
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Installing bitstring

Mon Aug 20, 2018 11:17 am

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'

rickticktock
Posts: 13
Joined: Mon Aug 20, 2018 10:13 am

Re: Installing bitstring

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

User avatar
Paeryn
Posts: 2702
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Installing bitstring

Wed Sep 12, 2018 3:01 pm

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.
She who travels light — forgot something.

Return to “Troubleshooting”