Giter Club home page Giter Club logo

Comments (7)

Salamek avatar Salamek commented on May 28, 2024

@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.

hista avatar hista commented on May 28, 2024

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.

Salamek avatar Salamek commented on May 28, 2024

@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.

hista avatar hista commented on May 28, 2024

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.

Salamek avatar Salamek commented on May 28, 2024

@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.

hista avatar hista commented on May 28, 2024

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.

Salamek avatar Salamek commented on May 28, 2024

@hista 👍

from huawei-lte-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.