Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
import ?
#9
This is getting pretty convoluted.

Can I include file here instead of text ? ( see what follows )

What is the difference between using "pip " to install and plain "apt install"?
It looks as the original issue was and still is mixing interpreter versions.

BTW - I did borrow a Python book from my grand kid teenager and I can read. When I asked him about his opinion of the book - he replied - "It is OK, but it should not take five chapters to explain "print " .
I "learn" from others code , reinventing wheel is not my forte. So I will not read the book from cover to cover, just pick what I need as I go .

I have a working C code doing what I want to do in python - inquire about nearby bluetooth devices. I have downloaded / installed and implemented C version of BlueZ.

Not so sure why I am having issues doing same in pyhton.

Here is what I get "installing " bluez:
( Sorry - it is a messy read, please concentrate on "bluez" )

z@z-desktop:~$ sudo pip install bluez
[sudo] password for z:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/developmen...-2-support
WARNING: The directory '/home/z/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
ERROR: Could not find a version that satisfies the requirement bluez (from versions: none)
ERROR: No matching distribution found for bluez

z@z-desktop:~$ sudo pip3 install bluez
The directory '/home/z/.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/z/.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.
Collecting bluez
Could not find a version that satisfies the requirement bluez (from versions: )
No matching distribution found for bluez
You are using pip version 8.1.1, however version 20.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.



z@z-desktop:~$ sudo apt install bluez
Reading package lists... Done
Building dependency tree
Reading state information... Done
bluez is already the newest version (5.37-0ubuntu5.3).
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] ^Y TYPO



z@z-desktop:~$ sudo apt install bluez
Reading package lists... Done
Building dependency tree
Reading state information... Done
bluez is already the newest version (5.37-0ubuntu5.3).
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 43815 package 'tomtomsportsconnect':
missing maintainer
Setting up runit (2.1.2-3ubuntu1) ...
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
dpkg: error processing package runit (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
z@z-desktop:~$


PS
I did "upgrade" pip several times and it still starts with older version and suggest to "upgrade"


PPS
I am not getting PM e-mails.
How do I change running thread to "just e-mails" ?
Reply


Messages In This Thread
import ? - by anne - Jul-29-2020, 10:20 PM
RE: import ? - by Yoriz - Jul-29-2020, 10:26 PM
RE: import ? - by anne - Jul-30-2020, 12:21 AM
RE: import ? - by bowlofred - Jul-30-2020, 01:15 AM
RE: import ? - by millpond - Jul-30-2020, 01:43 AM
RE: import ? - by anne - Jul-30-2020, 03:51 AM
RE: import ? - by millpond - Jul-30-2020, 04:22 AM
RE: import ? - by elenaflorence87 - Jul-30-2020, 04:51 AM
RE: import ? - by anne - Jul-30-2020, 02:22 PM
RE: import ? - by anne - Jul-30-2020, 04:34 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020