Can't upgrade to Pyserial 3.0


#1

Hi all,
I seem to have Pyserial 2.6 installed on my Pi which might be causing my connection issues. When I try to upgrade I get the following:

pi@raspberrypi:~ $ sudo apt-get upgrade python-serial
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… python-serial is already the newest version.
The following packages were automatically installed and are no longer required:
libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal
libhx509-5-heimdal libkrb5-26-heimdal libroken18-heimdal libwind0-heimdal libxfce4ui-1-0
pypy-upstream-doc wiringpi xfce-keyboard-shortcuts
Use ‘apt-get autoremove’ to remove them.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $

I have also tried the following with another barrier:

pi@raspberrypi:~ $ sudo pip install pyserial --upgrade
Downloading/unpacking pyserial from https://pypi.python.org/packages/49/db/5704dfc92d9a35f43d10744b0e661eeb1cbddc3bf8bd704592d653d23d86/pyserial-3.1.1-py2.py3-none-any.whl#md5=4b710443b1fd7d4685d301aa07f20539
Downloading pyserial-3.1.1-py2.py3-none-any.whl (200kB): 200kB downloaded
Installing collected packages: pyserial
Found existing installation: pyserial 2.6
Not uninstalling pyserial at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pyserial
Cleaning up…

Any thoughts on how I could upgrade this?


#2

Can you try uninstalling the apt package and then installing it with pip?


#3

I have a similar issue…
sudo pip install pyserial --upgrade
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Cleaning up…


#4

bump.
anyone have any ideas?


#5

Kevin,
I can’t remember the syntax but I actually ended up pointing the installation routine at a 3.0 file in the Internet rather than using the update routine.
Jason


#6

when this happens, remember to first run

sudo apt-get update

This checks what you have vs the repositories out there then run

sudo pip install pyserial --upgrade

reboot and you should be off and running


#7

Im very new to all this.
On my View Log from Maintenance Panel
it says
"BrewPi requires pyserial 3.0, you have version 2.7 installed.
Please upgrade pyserial via pip, by running:
sudo pip install pyserial --upgrade
If you do not have pip installed, install it with:
sudo apt-get install build-essential python-dev python-pip"

when i run sudo pip install pyserial --upgrade
it says “Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pyserial in /usr/local/lib/python2.7/dist-packages
No distribution at all found for pyserial in /usr/local/lib/python2.7/dist-packages
Storing complete log in /root/.pip.pip.log”

any thoughts?


#8

Not working for me either! Help!


#9

@Elco can you please help with this my brewpi is crippled with out the updated pyserial


#10

Can you try upgrading pip?

pip install --upgrade pip

#11

Yes I will try that now. Same message as Harry wang.


#12

It’s official my brewpi a paper weight. This is why I hesitate to update. Because of shit like this and no help to fix it.


#13

Shit like this? No help?

The upgrade to pyserial 3.0 happened on December 31, 2015.
So if you ran into this issue just now, it definitely didn’t happen because of software changes we did recently.

I was not able to reproduce your issue locally, so I googled your error message and found that it could be caused by an outdated version of pip, which is why I suggested it.

Upgrading pip and then retrying the upgrade of pyserial was my best guess.


#14

I apologize for being shitty, I was just super frustrated and couldn’t find any answers to my problem. everything I have tried has sent back the same message and it won’t update/upgrade and my script won’t start so I can’t see anything. I just updated my raspbien. And now I can’t install my brewpi cause of php7 and I tried docker but that’s turning out to be kinda confusing and not able to figure it out at the moment. Tired docker pull brewpub/brewpi-raspbian and got and error response from daemon: Get http://registry-1.docker.io/v2/: dial tcp: lookup registry-1.io on [::1]:53: read udp [::1]:50562->[::1]:53: read: connection refused. And when I try to update the timezone it says it’s July 3 2014


#15

brewpub/brewpi-raspbian ? Why brewpub? Or is this a typo?

Are you sure your pi has a good Internet connection? Can you ping google.com? Can you update packages with apt-get update? A bad Internet connection could explain many of your issues.

To run brewpi on the latest version of Raspbian with php-7 you need to make some changes to the install script, as shown in this pull request:

I have not have time to test the PR yet so I have not merged it yet. We just moved, so I had very little time for things lately and all my test setups are in boxes.

It will be easier to stay up-to-date with docker, because you can just get a new image. But as I said before, I think you had connection problems. With the latest hypriot image, it should be fairly easy to deploy the brewpi docker image.


#16

That was a typo. I’m flashed hypriot onto a new card and followed the directions maybe I’m just not understanding the process. I will try it on the new version of raspbian on my other card and work on trying to get docker working on my other card. I’m usually pretty good at getting this worked out. But it’s all just getting a little over my head. I have a great connection.


#17

I got this far but it wont complete the install.

To accept the default answer, just press Enter.
The default is capitalized in a Yes/No question: [Y/n]
or shown between brackets for other questions: [default]
The time is currently set to Fri 24 Nov 15:58:25 EST 2017. Is this correct? [Y/n]y

*** This script will first ask you where to install the brewpi python scripts and the web interface
Hitting ‘enter’ will accept the default option in [brackets] (recommended).

Any data in the following location will be ERASED during install!
Where would you like to install BrewPi? [/home/brewpi]: y
Installing script in /home/brewpi
Install directory is NOT empty, are you SURE you want to use this path? [y/N] y
Ok, we warned you!
Searching for default web install location…
Found /var/www/html

Any data in the following location will be ERASED during install!
Where would you like to copy the BrewPi web files to? [/var/www/html]: y
Installing web interface in y
This path does not exist, would you like to create it? [Y/n] y
Creating directory…

***** Creating and configuring user accounts… *****
User ‘brewpi’ already exists, skipping…

***** Checking install directories *****
/home/brewpi already exists
Script install directory is NOT empty, backing up to this users home dir and then deleting contents…
y already exists

***** Downloading most recent BrewPi codebase… *****
Cloning into ‘/home/brewpi’…
/home/pi/brewpi-tools/install.sh: line 275: cd: y: No such file or directory
fatal: could not create work tree dir ‘y’: Permission denied


#18

Accept the defaults with the enter key, you are now installing in the directory ‘y’


#19

Dang, haha oops, rookie! It’s working! Yes, thank you for help. Sorry I suck at this.


#20

I am getting the same error as @harry-wang. I actually have python3.2 in my /usr/local/lib/ directory as well as python 2.7, but not python 3.0.

In the brewpi logs, I get:

BrewPi requires pyserial 3.0, you have version 2.7 installed.
Please upgrade pyserial via pip, by running:
sudo pip install pyserial --upgrade
If you do not have pip installed, install it with:
sudo apt-get install build-essential python-dev python-pip

When I try to run either of these commands

sudo pip install pyserial --upgrade

or

pip install --upgrade pip

I get:

“Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pyserial in /usr/local/lib/python2.7/dist-packages
No distribution at all found for pyserial in /usr/local/lib/python2.7/dist-packages
Storing complete log in /root/.pip.pip.log”

Oddly enough, I’d been running my brewpi (arduino base) for years, then my SD card died and when I went to my backup, it was running 0.2.4 (master branch). I tried updating it to both master branch and legacy branch, but neither work. I am ultimately trying to get the Tilt integration working again (I had it up and running for a year), but now I’m struggling to even get the simple brewpi to communicate with my arduino.