Giter Club home page Giter Club logo

Comments (8)

zewelor avatar zewelor commented on July 22, 2024

From fast google search:
pypa/pip#5373
pypa/pip#5253

Are you using python 3 ?

from bt-mqtt-gateway.

jumping2000 avatar jumping2000 commented on July 22, 2024

hello, thank you for your answer!
before writing here I searched on google but the problem it'a a little bit different because Phyton and Pip appear to be good:

pi@raspberrypi:~/bt-mqtt-gateway $ pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)
pi@raspberrypi:~/bt-mqtt-gateway $ python3 --version
Python 3.5.3

from bt-mqtt-gateway.

bbbenji avatar bbbenji commented on July 22, 2024

What is the output of pip -V?

If it's an unknown command, you can either add an alias to your ~/.bashrc

alias pip=pip3

or add to your $PATH symlink named pip pointing to the pip3 binary.

from bt-mqtt-gateway.

jumping2000 avatar jumping2000 commented on July 22, 2024

this is the sequence of commands:

sudo apt install python-pip
.........
pi@raspberrypi:~/bt-mqtt-gateway $ 
pi@raspberrypi:~/bt-mqtt-gateway $ ./gateway.py
Traceback (most recent call last):
  File "./gateway.py", line 15, in <module>
    from workers_manager import WorkersManager
  File "/home/pi/bt-mqtt-gateway/workers_manager.py", line 4, in <module>
    from pip._internal import main as pip_main
ImportError: No module named 'pip._internal'
pi@raspberrypi:~/bt-mqtt-gateway $ pip -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)
pi@raspberrypi:~/bt-mqtt-gateway $
pi@raspberrypi:~/bt-mqtt-gateway $ sudo reboot now
.......
pi@raspberrypi:~ $ sudo easy_install pip
Searching for pip
Best match: pip 9.0.1
Adding pip 9.0.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Using /usr/lib/python2.7/dist-packages
Processing dependencies for pip
Finished processing dependencies for pip
pi@raspberrypi:~ $ sudo easy_install3 pip
Searching for pip
Best match: pip 9.0.1
Adding pip 9.0.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip3.5 script to /usr/local/bin
Installing pip3 script to /usr/local/bin

Using /usr/lib/python3/dist-packages
Processing dependencies for pip
Finished processing dependencies for pip
pi@raspberrypi:~ $ ls
bluez-5.49  bt-mqtt-gateway
pi@raspberrypi:~ $ cd bt-mqtt-gateway
pi@raspberrypi:~/bt-mqtt-gateway $ ./gateway.py
Traceback (most recent call last):
  File "./gateway.py", line 15, in <module>
    from workers_manager import WorkersManager
  File "/home/pi/bt-mqtt-gateway/workers_manager.py", line 4, in <module>
    from pip._internal import main as pip_main
ImportError: No module named 'pip._internal'
pi@raspberrypi:~/bt-mqtt-gateway $ 
....
pi@raspberrypi:~/bt-mqtt-gateway $ pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 63kB/s 
Installing collected packages: pip
Successfully installed pip-18.0
...
pi@raspberrypi:~/bt-mqtt-gateway $ ./gateway.py
Could not install packages due to an EnvironmentError: [Errno 13] Permesso negato: '/usr/local/lib/python3.5/dist-packages/construct'
Consider using the `--user` option or check the permissions.

Traceback (most recent call last):
  File "./gateway.py", line 30, in <module>
    manager.register_workers(settings['manager']).start(mqtt)
  File "/home/pi/bt-mqtt-gateway/workers_manager.py", line 40, in register_workers
    worker_obj = klass(**worker_config['args'])
  File "/home/pi/bt-mqtt-gateway/workers/base.py", line 5, in __init__
    self._setup()
  File "/home/pi/bt-mqtt-gateway/workers/thermostat.py", line 55, in _setup
    from eq3bt import Thermostat
ImportError: No module named 'eq3bt'

from bt-mqtt-gateway.

jumping2000 avatar jumping2000 commented on July 22, 2024

now after "pip install --upgrade pip" I have another type of error

from bt-mqtt-gateway.

bbbenji avatar bbbenji commented on July 22, 2024
pip install python-eq3bt

from bt-mqtt-gateway.

jumping2000 avatar jumping2000 commented on July 22, 2024

Great!! Now it works:
./gateway.py -d

Starting
Added: miflora with 600 seconds interval
Added: thermostat with 120 seconds interval
Subscribing to: thermostat/+/+/set
Subscribing to: homeassistant/status with command: update_all
Updating all workers

So, do you understand what was the problem?
I see in closed issues that there is not error with python 3.6 , maybe with python 3.5 do I need to upgrade pip (with pip install --upgrade pip) ?
bye

from bt-mqtt-gateway.

bbbenji avatar bbbenji commented on July 22, 2024

I think the error was that you had pip on Python 2.x and pip3 on Python 3.x. Then the second error was just missing python-eq3bt. Glad you got it working:)

from bt-mqtt-gateway.

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.