Installing python 3 on CentOS 6.9 without sudo [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Python 3 installation exits without installing zlib and pip. How can I fix this?



edit 2: I cannot use sudo.



edit:



I followed this guide. After running 'make' the installation exited with:



Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib
To find the necessary bits, look in setup.py in detect_modules() for the module's name.'

File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1






share|improve this question














closed as unclear what you're asking by Jeff Schaller, Tomasz, jimmij, mdpc, Rui F Ribeiro Jan 16 at 1:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • Can you post the installation log and the command you ran?
    – Kevin Lemaire
    Jan 15 at 11:08











  • I followed thislink After running 'make altinstall' the installation exited with:
    – spheroid
    Jan 15 at 11:37










  • You may complete your question, it's more efficient then comments.
    – Kevin Lemaire
    Jan 15 at 11:42










  • I've edited the question. I added part of the log.
    – spheroid
    Jan 15 at 11:50











  • Installing software without sudo often requires compiling from source.
    – Weijun Zhou
    Jan 15 at 13:31














up vote
1
down vote

favorite












Python 3 installation exits without installing zlib and pip. How can I fix this?



edit 2: I cannot use sudo.



edit:



I followed this guide. After running 'make' the installation exited with:



Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib
To find the necessary bits, look in setup.py in detect_modules() for the module's name.'

File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1






share|improve this question














closed as unclear what you're asking by Jeff Schaller, Tomasz, jimmij, mdpc, Rui F Ribeiro Jan 16 at 1:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • Can you post the installation log and the command you ran?
    – Kevin Lemaire
    Jan 15 at 11:08











  • I followed thislink After running 'make altinstall' the installation exited with:
    – spheroid
    Jan 15 at 11:37










  • You may complete your question, it's more efficient then comments.
    – Kevin Lemaire
    Jan 15 at 11:42










  • I've edited the question. I added part of the log.
    – spheroid
    Jan 15 at 11:50











  • Installing software without sudo often requires compiling from source.
    – Weijun Zhou
    Jan 15 at 13:31












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Python 3 installation exits without installing zlib and pip. How can I fix this?



edit 2: I cannot use sudo.



edit:



I followed this guide. After running 'make' the installation exited with:



Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib
To find the necessary bits, look in setup.py in detect_modules() for the module's name.'

File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1






share|improve this question














Python 3 installation exits without installing zlib and pip. How can I fix this?



edit 2: I cannot use sudo.



edit:



I followed this guide. After running 'make' the installation exited with:



Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib
To find the necessary bits, look in setup.py in detect_modules() for the module's name.'

File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/home/sites/3b/4/40b84bb780/Python-
3.6.4/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1








share|improve this question













share|improve this question




share|improve this question








edited Jan 15 at 12:04

























asked Jan 15 at 10:59









spheroid

163




163




closed as unclear what you're asking by Jeff Schaller, Tomasz, jimmij, mdpc, Rui F Ribeiro Jan 16 at 1:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by Jeff Schaller, Tomasz, jimmij, mdpc, Rui F Ribeiro Jan 16 at 1:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • Can you post the installation log and the command you ran?
    – Kevin Lemaire
    Jan 15 at 11:08











  • I followed thislink After running 'make altinstall' the installation exited with:
    – spheroid
    Jan 15 at 11:37










  • You may complete your question, it's more efficient then comments.
    – Kevin Lemaire
    Jan 15 at 11:42










  • I've edited the question. I added part of the log.
    – spheroid
    Jan 15 at 11:50











  • Installing software without sudo often requires compiling from source.
    – Weijun Zhou
    Jan 15 at 13:31
















  • Can you post the installation log and the command you ran?
    – Kevin Lemaire
    Jan 15 at 11:08











  • I followed thislink After running 'make altinstall' the installation exited with:
    – spheroid
    Jan 15 at 11:37










  • You may complete your question, it's more efficient then comments.
    – Kevin Lemaire
    Jan 15 at 11:42










  • I've edited the question. I added part of the log.
    – spheroid
    Jan 15 at 11:50











  • Installing software without sudo often requires compiling from source.
    – Weijun Zhou
    Jan 15 at 13:31















Can you post the installation log and the command you ran?
– Kevin Lemaire
Jan 15 at 11:08





Can you post the installation log and the command you ran?
– Kevin Lemaire
Jan 15 at 11:08













I followed thislink After running 'make altinstall' the installation exited with:
– spheroid
Jan 15 at 11:37




I followed thislink After running 'make altinstall' the installation exited with:
– spheroid
Jan 15 at 11:37












You may complete your question, it's more efficient then comments.
– Kevin Lemaire
Jan 15 at 11:42




You may complete your question, it's more efficient then comments.
– Kevin Lemaire
Jan 15 at 11:42












I've edited the question. I added part of the log.
– spheroid
Jan 15 at 11:50





I've edited the question. I added part of the log.
– spheroid
Jan 15 at 11:50













Installing software without sudo often requires compiling from source.
– Weijun Zhou
Jan 15 at 13:31




Installing software without sudo often requires compiling from source.
– Weijun Zhou
Jan 15 at 13:31










2 Answers
2






active

oldest

votes

















up vote
1
down vote













zlib is needed to complete the installation.



Regarding edit2:
You may try with RPM. Download the zlib-devel rpm and then run rpm -ivh package.rpm



To install it on CentOS:
sudo yum install zlib-devel



Then run the make command again.






share|improve this answer






















  • I do not have sudo access. It's a shared hosting server.
    – spheroid
    Jan 15 at 12:02










  • Can you try the edit with rpm?
    – Kevin Lemaire
    Jan 15 at 12:26










  • I had tried to do that but I got an error - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. according to this thread , you need to use it with sudo?
    – spheroid
    Jan 15 at 12:37











  • This means you also need sudo access for rpm command. It's not always the case.
    – Kevin Lemaire
    Jan 15 at 13:04


















up vote
0
down vote













You can try the below; make altinstallto try to get around any sudo permission needed to replace the default python binary file in /usr/bin/python



yum install gcc
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0a1.tgz
tar xzf Python-3.7.0a1.tgz
cd Python-3.7.0a1
./configure
make altinstall





share|improve this answer




















  • yum is sudo restricted so first line won't run
    – Kevin Lemaire
    Jan 15 at 16:05










  • Sounds like you need to reach out to your system admin. Probably a reason for the account you are using to not has sudo access.
    – Govna
    Jan 15 at 18:34

















2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













zlib is needed to complete the installation.



Regarding edit2:
You may try with RPM. Download the zlib-devel rpm and then run rpm -ivh package.rpm



To install it on CentOS:
sudo yum install zlib-devel



Then run the make command again.






share|improve this answer






















  • I do not have sudo access. It's a shared hosting server.
    – spheroid
    Jan 15 at 12:02










  • Can you try the edit with rpm?
    – Kevin Lemaire
    Jan 15 at 12:26










  • I had tried to do that but I got an error - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. according to this thread , you need to use it with sudo?
    – spheroid
    Jan 15 at 12:37











  • This means you also need sudo access for rpm command. It's not always the case.
    – Kevin Lemaire
    Jan 15 at 13:04















up vote
1
down vote













zlib is needed to complete the installation.



Regarding edit2:
You may try with RPM. Download the zlib-devel rpm and then run rpm -ivh package.rpm



To install it on CentOS:
sudo yum install zlib-devel



Then run the make command again.






share|improve this answer






















  • I do not have sudo access. It's a shared hosting server.
    – spheroid
    Jan 15 at 12:02










  • Can you try the edit with rpm?
    – Kevin Lemaire
    Jan 15 at 12:26










  • I had tried to do that but I got an error - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. according to this thread , you need to use it with sudo?
    – spheroid
    Jan 15 at 12:37











  • This means you also need sudo access for rpm command. It's not always the case.
    – Kevin Lemaire
    Jan 15 at 13:04













up vote
1
down vote










up vote
1
down vote









zlib is needed to complete the installation.



Regarding edit2:
You may try with RPM. Download the zlib-devel rpm and then run rpm -ivh package.rpm



To install it on CentOS:
sudo yum install zlib-devel



Then run the make command again.






share|improve this answer














zlib is needed to complete the installation.



Regarding edit2:
You may try with RPM. Download the zlib-devel rpm and then run rpm -ivh package.rpm



To install it on CentOS:
sudo yum install zlib-devel



Then run the make command again.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 15 at 12:20

























answered Jan 15 at 11:55









Kevin Lemaire

1,037421




1,037421











  • I do not have sudo access. It's a shared hosting server.
    – spheroid
    Jan 15 at 12:02










  • Can you try the edit with rpm?
    – Kevin Lemaire
    Jan 15 at 12:26










  • I had tried to do that but I got an error - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. according to this thread , you need to use it with sudo?
    – spheroid
    Jan 15 at 12:37











  • This means you also need sudo access for rpm command. It's not always the case.
    – Kevin Lemaire
    Jan 15 at 13:04

















  • I do not have sudo access. It's a shared hosting server.
    – spheroid
    Jan 15 at 12:02










  • Can you try the edit with rpm?
    – Kevin Lemaire
    Jan 15 at 12:26










  • I had tried to do that but I got an error - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. according to this thread , you need to use it with sudo?
    – spheroid
    Jan 15 at 12:37











  • This means you also need sudo access for rpm command. It's not always the case.
    – Kevin Lemaire
    Jan 15 at 13:04
















I do not have sudo access. It's a shared hosting server.
– spheroid
Jan 15 at 12:02




I do not have sudo access. It's a shared hosting server.
– spheroid
Jan 15 at 12:02












Can you try the edit with rpm?
– Kevin Lemaire
Jan 15 at 12:26




Can you try the edit with rpm?
– Kevin Lemaire
Jan 15 at 12:26












I had tried to do that but I got an error - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. according to this thread , you need to use it with sudo?
– spheroid
Jan 15 at 12:37





I had tried to do that but I got an error - 'error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)'. according to this thread , you need to use it with sudo?
– spheroid
Jan 15 at 12:37













This means you also need sudo access for rpm command. It's not always the case.
– Kevin Lemaire
Jan 15 at 13:04





This means you also need sudo access for rpm command. It's not always the case.
– Kevin Lemaire
Jan 15 at 13:04













up vote
0
down vote













You can try the below; make altinstallto try to get around any sudo permission needed to replace the default python binary file in /usr/bin/python



yum install gcc
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0a1.tgz
tar xzf Python-3.7.0a1.tgz
cd Python-3.7.0a1
./configure
make altinstall





share|improve this answer




















  • yum is sudo restricted so first line won't run
    – Kevin Lemaire
    Jan 15 at 16:05










  • Sounds like you need to reach out to your system admin. Probably a reason for the account you are using to not has sudo access.
    – Govna
    Jan 15 at 18:34














up vote
0
down vote













You can try the below; make altinstallto try to get around any sudo permission needed to replace the default python binary file in /usr/bin/python



yum install gcc
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0a1.tgz
tar xzf Python-3.7.0a1.tgz
cd Python-3.7.0a1
./configure
make altinstall





share|improve this answer




















  • yum is sudo restricted so first line won't run
    – Kevin Lemaire
    Jan 15 at 16:05










  • Sounds like you need to reach out to your system admin. Probably a reason for the account you are using to not has sudo access.
    – Govna
    Jan 15 at 18:34












up vote
0
down vote










up vote
0
down vote









You can try the below; make altinstallto try to get around any sudo permission needed to replace the default python binary file in /usr/bin/python



yum install gcc
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0a1.tgz
tar xzf Python-3.7.0a1.tgz
cd Python-3.7.0a1
./configure
make altinstall





share|improve this answer












You can try the below; make altinstallto try to get around any sudo permission needed to replace the default python binary file in /usr/bin/python



yum install gcc
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0a1.tgz
tar xzf Python-3.7.0a1.tgz
cd Python-3.7.0a1
./configure
make altinstall






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 15 at 15:20









Govna

7817




7817











  • yum is sudo restricted so first line won't run
    – Kevin Lemaire
    Jan 15 at 16:05










  • Sounds like you need to reach out to your system admin. Probably a reason for the account you are using to not has sudo access.
    – Govna
    Jan 15 at 18:34
















  • yum is sudo restricted so first line won't run
    – Kevin Lemaire
    Jan 15 at 16:05










  • Sounds like you need to reach out to your system admin. Probably a reason for the account you are using to not has sudo access.
    – Govna
    Jan 15 at 18:34















yum is sudo restricted so first line won't run
– Kevin Lemaire
Jan 15 at 16:05




yum is sudo restricted so first line won't run
– Kevin Lemaire
Jan 15 at 16:05












Sounds like you need to reach out to your system admin. Probably a reason for the account you are using to not has sudo access.
– Govna
Jan 15 at 18:34




Sounds like you need to reach out to your system admin. Probably a reason for the account you are using to not has sudo access.
– Govna
Jan 15 at 18:34


Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)