Install error in Python - Duh! my fault - solved

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Install error in Python - Duh! my fault - solved

Post by AZgl1800 »

Just finished installing Python 3.7 and it has 1 error, it wants 'zlib'

looked in Synaptic and didn't find it.

any suggestions? Probably should join the Python forum and ask there,

Code: Select all

Traceback (most recent call last):
  File "/home/john/Downloads/Python/Python-3.7.0/Lib/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/john/Downloads/Python/Python-3.7.0/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/john/Downloads/Python/Python-3.7.0/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "/home/john/Downloads/Python/Python-3.7.0/Lib/ensurepip/__init__.py", line 204, in _main
    default_pip=args.default_pip,
  File "/home/john/Downloads/Python/Python-3.7.0/Lib/ensurepip/__init__.py", line 117, in _bootstrap
    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/home/john/Downloads/Python/Python-3.7.0/Lib/ensurepip/__init__.py", line 27, in _run_pip
    import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
Makefile:1122: recipe for target 'install' failed
make: *** [install] Error 1

Reading here, I am lost, don't know what to do.

http://www.zlib.net/
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel »

AZgl1500 wrote: Fri Sep 21, 2018 11:00 pm Just finished installing Python 3.7 and it has 1 error, it wants 'zlib'
Surely you've been here long enough to know that manually installing another python3 would b0rk your system?

https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa

<shakes head>
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Install error in Python

Post by AZgl1800 »

I was looking for the interpreter so I could work thru the tutorials.
and could not find it in the menu, nor in Software Manager / Synaptic

so, I can just Timeshift backward and get rid of it, if it is already installed?
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel »

AZgl1500 wrote: Fri Sep 21, 2018 11:11 pm so, I can just Timeshift backward and get rid of it, if it is already installed?
I suppose so.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Install error in Python

Post by AZgl1800 »

catweazel wrote: Fri Sep 21, 2018 11:15 pm
AZgl1500 wrote: Fri Sep 21, 2018 11:11 pm so, I can just Timeshift backward and get rid of it, if it is already installed?
I suppose so.
Looked at what Restore in Timeshift was going to do, and since a Daily Backup was just made a few hours ago, about the only thing in that list was delete python*

so, I let it run, took about 30 seconds, and it rebooted and I'm back where I was.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel »

AZgl1500 wrote: Fri Sep 21, 2018 11:24 pm
catweazel wrote: Fri Sep 21, 2018 11:15 pm
AZgl1500 wrote: Fri Sep 21, 2018 11:11 pm so, I can just Timeshift backward and get rid of it, if it is already installed?
I suppose so.
Looked at what Restore in Timeshift was going to do, and since a Daily Backup was just made a few hours ago, about the only thing in that list was delete python*

so, I let it run, took about 30 seconds, and it rebooted and I'm back where I was.
If you really must have the latest python3, use the PPA I linked to above.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Install error in Python

Post by AZgl1800 »

I don't care which version I have,
I just wanted to get to the interpreter so that I could test the examples in the tutorials that I was following.

I tried one online, and it quit working after step 3... making it useless.

Put the test code in the left window, click on 'run' and observe the output in the right window.
and I don't see an interpreter in the Cinnamon menu.


I just looked at Synaptic, and 18.3 Cinnamon has a huge amount of Python3 modules already loaded.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel »

AZgl1500 wrote: Sat Sep 22, 2018 12:00 am I don't care which version I have,
I just wanted to get to the interpreter so that I could test the examples in the tutorials that I was following.
Python3 is part of the standard installation. You have no need to do anything other than type python3 in a terminal.

Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Install error in Python

Post by AZgl1800 »

that gives:

john@john-TP500LA ~ $ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

not what I was expecting. the tutorial I was following online has a Graphical Interpreter with two windows.
you can see the code on the left, and observe the output... or error statements on the right.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel »

AZgl1500 wrote: Sat Sep 22, 2018 12:07 am that gives:

john@john-TP500LA ~ $ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

not what I was expecting. the tutorial I was following online has a Graphical Interpreter with two windows.
you can see the code on the left, and observe the output... or error statements on the right.
That's because it's a web page and it's designed that way. >>> is the python prompt.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
AndyMH
Level 21
Level 21
Posts: 13578
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Install error in Python

Post by AndyMH »

Given that you are just starting with python it's worth installing IDLE* (there's a version in the software manager for python 3). This gives you an interactive development environment.

You may also want pip (again in sw mgr) to install python packages, noting that I had a bit of trouble getting it to work under LM19.

* Yet more monty python references :)
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Install error in Python

Post by AZgl1800 »

Thanks guys,
I am so new at this, don't even know where I am going with it.

@catweazel
later, I realized the >>> was a Python prompt and I started pasting in some of the "hello world" scripts and changing the " " characters and ' ' characters and ( ) characters around to observe their effect on the output.

it became obvious really fast that the Web Page I was using at first, is not a valid place for me to learn even the most basic of Python scripts, because all of their examples produced errors in the Python installed in 18.3

I would have been learning the wrong way to do it.... not a good thing.

thanks, I am off to more reading, and playing now.
going to call it 'solved'
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Install error in Python

Post by AZgl1800 »

AndyMH wrote: Sat Sep 22, 2018 4:22 am Given that you are just starting with python it's worth installing IDLE* (there's a version in the software manager for python 3). This gives you an interactive development environment.

You may also want pip (again in sw mgr) to install python packages, noting that I had a bit of trouble getting it to work under LM19.

* Yet more monty python references :)
just installed IDLE, and like it.
Thank you

on pip I noted some comments that it keeps the package in a location where apt can't see it.
so going to hold off until I get to a point where I actually am smart enough to create something worth "installing"

but, if what you have created is driven by a Menu selection, I suppose it don't make any difference?
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
AndyMH
Level 21
Level 21
Posts: 13578
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Install error in Python - Duh! my fault - solved

Post by AndyMH »

I noted some comments that it keeps the package in a location where apt can't see it.
Pip installs python programs which is why apt can't see them - they are just python scripts (I think, I'm only a few months/weeks ahead of you with python). They are an easy way of extending the functionality of python. Many of the tutorials suggest that you install this or that package dependent on what they are doing.

I started here: https://www.amazon.co.uk/gp/product/159 ... UTF8&psc=1
Very useful, very practical.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Install error in Python - Duh! my fault - solved

Post by AZgl1800 »

AndyMH wrote: Sat Sep 22, 2018 4:12 pm
I noted some comments that it keeps the package in a location where apt can't see it.
Pip installs python programs which is why apt can't see them - they are just python scripts (I think, I'm only a few months/weeks ahead of you with python). They are an easy way of extending the functionality of python. Many of the tutorials suggest that you install this or that package dependent on what they are doing.

I started here: https://www.amazon.co.uk/gp/product/159 ... UTF8&psc=1
Very useful, very practical.
Thanks for that link, we have a Kindle Unlimited account, will add that to my Kindle Paperwhite....
will be neat to have a screen big enough to read, next to me while I tickle the keys on the PC.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Locked

Return to “Software & Applications”