Install error in Python - Duh! my fault - solved

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » Fri Sep 21, 2018 11:00 pm

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 AZgl1500 on Sat Sep 22, 2018 11:57 am, edited 1 time in total.

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel » Fri Sep 21, 2018 11:06 pm

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>
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » Fri Sep 21, 2018 11:11 pm

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?

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel » 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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » 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.

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel » Fri Sep 21, 2018 11:28 pm

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » 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.

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.

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel » Sat Sep 22, 2018 12:03 am

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » 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.

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Install error in Python

Post by catweazel » Sat Sep 22, 2018 12:28 am

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
AndyMH
Level 5
Level 5
Posts: 845
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Install error in Python

Post by AndyMH » 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 :)
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » Sat Sep 22, 2018 11:56 am

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'

User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » Sat Sep 22, 2018 12:07 pm

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?

User avatar
AndyMH
Level 5
Level 5
Posts: 845
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

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

Post by AndyMH » 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.
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

User avatar
AZgl1500
Level 9
Level 9
Posts: 2860
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 AZgl1500 » Sat Sep 22, 2018 4:36 pm

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.

Post Reply

Return to “Software & Applications”