Comments (7)
@hista From your log
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
In my world Python 2 is deprecated since two> years ago... so this is python3 only project, you must install python 3 to your OS, if you are using Debian based distribution just run:
# Install python3 pip, this will install python3 as depedency
apt update && apt install python3-pip
# Call pip3 and install huawei-lte-api
pip3 install huawei-lte-api
Closing...
from huawei-lte-api.
Thanks for your quick answer.
I already tried pip3, but it didn't work either:
pip3 install huawei-lte-api
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in <module>
from pip import main
ImportError: cannot import name 'main' from 'pip' (/usr/lib/python3/dist-packages/pip/__init__.py)
from huawei-lte-api.
@hista that looks like broken python3/pip3 install, try to reinstall it:
apt update && apt install --reinstall python3 python3-pip
and try again
from huawei-lte-api.
Unfortunately it didn't work:
sudo apt install --reinstall python3 python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libclamav7
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
Need to get 232 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian sid/main amd64 python3 amd64 3.7.2-1 [61.5 kB]
Get:2 http://deb.debian.org/debian sid/main amd64 python3-pip all 18.1-4 [171 kB]
Fetched 232 kB in 1s (300 kB/s)
(Reading database ... 478636 files and directories currently installed.)
Preparing to unpack .../python3_3.7.2-1_amd64.deb ...
running python pre-rtupdate hooks for python3.7...
Unpacking python3 (3.7.2-1) over (3.7.2-1) ...
Preparing to unpack .../python3-pip_18.1-4_all.deb ...
Unpacking python3-pip (18.1-4) over (18.1-4) ...
Setting up python3 (3.7.2-1) ...
running python rtupdate hooks for python3.7...
running python post-rtupdate hooks for python3.7...
Setting up python3-pip (18.1-4) ...
Processing triggers for man-db (2.8.5-2) ...
$ pip3 install huawei-lte-api
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in <module>
from pip import main
ImportError: cannot import name 'main' from 'pip' (/usr/lib/python3/dist-packages/pip/__init__.py)
from huawei-lte-api.
@hista You need to get your pip3 working, printing version should look like this:
sadam@salamek:~$ pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)
sadam@salamek:~$
Or you can try installing from my Debian repository (if that is valid option for your workflow), see: https://github.com/Salamek/huawei-lte-api#repository
But i would suggest to solve your python3/pip3 issues first...
from huawei-lte-api.
Thanks to google, I've found a solution:
sudo python3 -m pip install --user huawei-lte-api
Collecting huawei-lte-api
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/ef/0a/e8cb71f836aba163f0bb8f8695ee9a11c2a83a506eaddc4b6ce9d309097e/huawei-lte-api-1.1.4.tar.gz
Collecting dicttoxml (from huawei-lte-api)
Downloading https://files.pythonhosted.org/packages/74/36/534db111db9e7610a41641a1f6669a964aacaf51858f466de264cc8dcdd9/dicttoxml-1.7.4.tar.gz
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from huawei-lte-api) (2.21.0)
Collecting xmltodict (from huawei-lte-api)
Downloading https://files.pythonhosted.org/packages/28/fd/30d5c1d3ac29ce229f6bdc40bbc20b28f716e8b363140c26eff19122d8a5/xmltodict-0.12.0-py2.py3-none-any.whl
Building wheels for collected packages: huawei-lte-api, dicttoxml
Running setup.py bdist_wheel for huawei-lte-api ... done
Stored in directory: /root/.cache/pip/wheels/4b/4c/b8/14b191fc7fa1d467f86fc649f714ddf7e7dac031f72dabc31c
Running setup.py bdist_wheel for dicttoxml ... done
Stored in directory: /root/.cache/pip/wheels/62/4f/a3/afd4a68f5add45a668c14efa53b64d5cffb2be6bacf993c151
Successfully built huawei-lte-api dicttoxml
Installing collected packages: dicttoxml, xmltodict, huawei-lte-api
Successfully installed dicttoxml-1.7.4 huawei-lte-api-1.1.4 xmltodict-0.12.0
Thanks for your help Salamek!
from huawei-lte-api.
@hista 👍
from huawei-lte-api.
Related Issues (20)
- KeyError: 'password_type' on E5776s-32 HOT 9
- Delete all messages from LocalOutbox HOT 3
- Version called 1.6 on GitHub but 1.6.0 on PyPI HOT 2
- could you add the restart precedure on the code ??? HOT 2
- prometheus: huawei-lte-exporter
- Request for Enhancement
- ResponseErrorException: 100006 for hardware CL2E3372HM HOT 8
- Reboot script HOT 1
- Switch Wifi on/off HOT 3
- Exception on log-out ResponseErrorWrongSessionToken: 125003: Wrong Session Token HOT 3
- Issues with multi-part SMS messages (Type 2) HOT 9
- Disabling automatic online updates HOT 3
- Quicksetup HOT 5
- Disabling IPv6 HOT 2
- Can't connect to my modem HOT 4
- Unable to connect to Huawei B535-333 with the error 125003 (Wrong token)
- Toggle VPN status HOT 7
- Can't enable telnet on device HOT 1
- Huawei E8231 also work HOT 1
- Error: 113004 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huawei-lte-api.