Hey Maiky,
I was running version 0.7.4
, looks like 0.7.5
has a fix for this. I just tried to run the update script with curl -L hologram.io/python-update | bash
, but I think something in the installation process isn’t working correctly because I get this error traceback when I attempt to run the same script from above:
Traceback (most recent call last):
File "hologram_test.py", line 2, in <module>
from Hologram.HologramCloud import HologramCloud
File "/usr/local/lib/python2.7/dist-packages/Hologram/HologramCloud.py", line 14, in <module>
from CustomCloud import CustomCloud
File "/usr/local/lib/python2.7/dist-packages/Hologram/CustomCloud.py", line 15, in <module>
from Cloud import Cloud
File "/usr/local/lib/python2.7/dist-packages/Hologram/Cloud.py", line 13, in <module>
from Network import NetworkManager
File "/usr/local/lib/python2.7/dist-packages/Hologram/Network/NetworkManager.py", line 15, in <module>
from Cellular import Cellular
File "/usr/local/lib/python2.7/dist-packages/Hologram/Network/Cellular.py", line 14, in <module>
from Modem import Modem
File "/usr/local/lib/python2.7/dist-packages/Hologram/Network/Modem/__init__.py", line 2, in <module>
from Modem import *
File "/usr/local/lib/python2.7/dist-packages/Hologram/Network/Modem/Modem.py", line 27, in <module>
from serial.serialutil import Timeout
ImportError: cannot import name Timeout
This is the entire output of the upgrade process:
The directory '/home/sriram/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/sriram/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: hologram-python in /usr/local/lib/python2.7/dist-packages
Collecting enum34==1.1.6 (from hologram-python)
Downloading enum34-1.1.6-py2-none-any.whl
Requirement already up-to-date: hjson==2.0.2 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: mock==2.0.0 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Collecting psutil==5.3.1 (from hologram-python)
Downloading psutil-5.3.1.tar.gz (397kB)
100% |████████████████████████████████| 399kB 740kB/s
Requirement already up-to-date: pyroute2==0.4.21 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Collecting pyserial==3.3 (from hologram-python)
Downloading pyserial-3.3-py2.py3-none-any.whl (189kB)
100% |████████████████████████████████| 194kB 555kB/s
Requirement already up-to-date: pytest==3.0.5 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: python-pppd==1.0.3 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: python-sdk-auth==0.2.1 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: python-wifi==0.6.1 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pyudev==0.21.0 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pyusb==1.0.0 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Collecting requests==2.18.3 (from hologram-python)
Downloading requests-2.18.3-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 534kB/s
Collecting pbr>=0.11 (from mock==2.0.0->hologram-python)
Downloading pbr-3.1.1-py2.py3-none-any.whl (99kB)
100% |████████████████████████████████| 102kB 829kB/s
Requirement already up-to-date: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock==2.0.0->hologram-python)
Requirement already up-to-date: six>=1.9 in /usr/lib/python2.7/dist-packages (from mock==2.0.0->hologram-python)
Requirement already up-to-date: py>=1.4.29 in /usr/local/lib/python2.7/dist-packages (from pytest==3.0.5->hologram-python)
Requirement already up-to-date: pycrypto==2.6.1 in /usr/lib/python2.7/dist-packages (from python-sdk-auth==0.2.1->hologram-python)
Collecting certifi>=2017.4.17 (from requests==2.18.3->hologram-python)
Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB)
100% |████████████████████████████████| 153kB 2.1MB/s
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/dist-packages (from requests==2.18.3->hologram-python)
Collecting urllib3<1.23,>=1.21.1 (from requests==2.18.3->hologram-python)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |████████████████████████████████| 133kB 292kB/s
Requirement already up-to-date: idna<2.6,>=2.5 in /usr/lib/python2.7/dist-packages (from requests==2.18.3->hologram-python)
Installing collected packages: enum34, psutil, pyserial, certifi, urllib3, requests, pbr
Found existing installation: enum34 1.1.2
Not uninstalling enum34 at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: psutil 5.0.1
Not uninstalling psutil at /usr/lib/python2.7/dist-packages, outside environment /usr
Running setup.py install for psutil ... done
Found existing installation: pyserial 3.0.1
Not uninstalling pyserial at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: certifi 2017.4.17
Not uninstalling certifi at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: urllib3 1.21.1
Not uninstalling urllib3 at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: requests 2.18.1
Not uninstalling requests at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: pbr 1.8.0
Not uninstalling pbr at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed certifi-2017.4.17 enum34-1.1.2 pbr-1.8.0 psutil-5.0.1 pyserial-3.0.1 requests-2.18.1 urllib3-1.21.1
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I tried to resolve this by installing the latest version of pip with pip install --upgrade pip
but was only able to upgrade to an 8.x version of pip. I had to uninstall pip in the package manager with sudo apt-get purge python-pip
, which brought me to pip
version 9.0.1.
Now, during the upgrade process, i’m being told that all my requirements are up to date:
Requirement already up-to-date: hologram-python in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: enum34==1.1.6 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: hjson==2.0.2 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: mock==2.0.0 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: psutil==5.3.1 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pyroute2==0.4.21 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pyserial==3.3 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pytest==3.0.5 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: python-pppd==1.0.3 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: python-sdk-auth==0.2.1 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: python-wifi==0.6.1 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pyudev==0.21.0 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pyusb==1.0.0 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: requests==2.18.3 in /usr/local/lib/python2.7/dist-packages (from hologram-python)
Requirement already up-to-date: pbr>=0.11 in /usr/local/lib/python2.7/dist-packages (from mock==2.0.0->hologram-python)
Requirement already up-to-date: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock==2.0.0->hologram-python)
Requirement already up-to-date: six>=1.9 in /usr/lib/python2.7/dist-packages (from mock==2.0.0->hologram-python)
Requirement already up-to-date: py>=1.4.29 in /usr/local/lib/python2.7/dist-packages (from pytest==3.0.5->hologram-python)
Requirement already up-to-date: pycrypto==2.6.1 in /usr/lib/python2.7/dist-packages (from python-sdk-auth==0.2.1->hologram-python)
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests==2.18.3->hologram-python)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/dist-packages (from requests==2.18.3->hologram-python)
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests==2.18.3->hologram-python)
Requirement already up-to-date: idna<2.6,>=2.5 in /usr/lib/python2.7/dist-packages (from requests==2.18.3->hologram-python)
However, I still get the ImportError: cannot import name Timeout
error message. Not really sure why this is the case.