Trying tcompile an use the Python 3.4a

F

Ferrous Cranus

$ mkdir temp
$ cd temp
$ wget http://www.python.org/ftp/python/3.4/Python-3.4.tar.bz2
$ tar -xjvf Python-3.4.tar.bz2
$ cd Python-3.3.2
$ ./configure
$ make && make test
$ su
# make install
# exit
$ $ cd ../ && rm -rf Python-3.4


root@secure [/home/nikos/www/cgi-bin]# python3 -V
Python 3.4.0a4


can yu please tell me where python 3.4a was placed in the system?

i tried

#!/usr/bin/python3
#!/usr/local/bin/python3

and also is there a way to call it like #!/usr/bin/python

i know it can be done via ln 0s but i have to know where the newest
python got installed.

Thank you.
 
F

Ferrous Cranus

Στις 13/11/2013 4:17 μμ, ο/η Ferrous Cranus έγÏαψε:
$ mkdir temp
$ cd temp
$ wget http://www.python.org/ftp/python/3.4/Python-3.4.tar.bz2
$ tar -xjvf Python-3.4.tar.bz2
$ cd Python-3.3.2
$ ./configure
$ make && make test
$ su
# make install
# exit
$ $ cd ../ && rm -rf Python-3.4


root@secure [/home/nikos/www/cgi-bin]# python3 -V
Python 3.4.0a4


can yu please tell me where python 3.4a was placed in the system?

i tried

#!/usr/bin/python3
#!/usr/local/bin/python3

and also is there a way to call it like #!/usr/bin/python

i know it can be done via ln 0s but i have to know where the newest
python got installed.

Thank you.


I also tried to install pip and easy_install on my CentOS but could not
find them.

How can I install them?

Also, I have two versions of Python, 2.6.6 and 3.4a. How will pip make
sure to link newly installed components with Python 3.4a ?
 
C

Chris “Kwpolska†Warrick

$ mkdir temp
$ cd temp
$ wget http://www.python.org/ftp/python/3.4/Python-3.4.tar.bz2
$ tar -xjvf Python-3.4.tar.bz2
$ cd Python-3.3.2
$ ./configure
$ make && make test
$ su
# make install
# exit
$ $ cd ../ && rm -rf Python-3.4


root@secure [/home/nikos/www/cgi-bin]# python3 -V
Python 3.4.0a4


can yu please tell me where python 3.4a was placed in the system?

i tried

#!/usr/bin/python3
#!/usr/local/bin/python3

and also is there a way to call it like #!/usr/bin/python

i know it can be done via ln 0s but i have to know where the newest python
got installed.

Thank you.

The command you are looking for is: which python3
Alternatively, you could run `where python3` to see how big the mess
on your system is (i.e. how many interpreters you have).
 
F

Ferrous Cranus

Στις 13/11/2013 4:23 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:
$ mkdir temp
$ cd temp
$ wget http://www.python.org/ftp/python/3.4/Python-3.4.tar.bz2
$ tar -xjvf Python-3.4.tar.bz2
$ cd Python-3.3.2
$ ./configure
$ make && make test
$ su
# make install
# exit
$ $ cd ../ && rm -rf Python-3.4


root@secure [/home/nikos/www/cgi-bin]# python3 -V
Python 3.4.0a4


can yu please tell me where python 3.4a was placed in the system?

i tried

#!/usr/bin/python3
#!/usr/local/bin/python3

and also is there a way to call it like #!/usr/bin/python

i know it can be done via ln 0s but i have to know where the newest python
got installed.

Thank you.

The command you are looking for is: which python3
Alternatively, you could run `where python3` to see how big the mess
on your system is (i.e. how many interpreters you have).


root@secure [~]# which python3
/usr/local/bin/python3
root@secure [~]# where pyhton3
-bash: where: command not found

also how can a link the newset python to just /usr/bin/python.
here is what i tried

root@secure [~]# ln -s /usr/local/bin/python3 /usr/bin/python
ln: creating symbolic link `/usr/bin/python': File exists
root@secure [~]#
 
F

Ferrous Cranus

Στις 13/11/2013 4:23 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:
$ mkdir temp
$ cd temp
$ wget http://www.python.org/ftp/python/3.4/Python-3.4.tar.bz2
$ tar -xjvf Python-3.4.tar.bz2
$ cd Python-3.3.2
$ ./configure
$ make && make test
$ su
# make install
# exit
$ $ cd ../ && rm -rf Python-3.4


root@secure [/home/nikos/www/cgi-bin]# python3 -V
Python 3.4.0a4


can yu please tell me where python 3.4a was placed in the system?

i tried

#!/usr/bin/python3
#!/usr/local/bin/python3

and also is there a way to call it like #!/usr/bin/python

i know it can be done via ln 0s but i have to know where the newest python
got installed.

Thank you.

The command you are looking for is: which python3
Alternatively, you could run `where python3` to see how big the mess
on your system is (i.e. how many interpreters you have).


root@secure [~]# which python
/usr/bin/python

root@secure [~]# which python3
/usr/local/bin/python3

root@secure [~]# python -V
Python 2.6.6

root@secure [~]# python3 -V
Python 3.4.0a4
root@secure [~]#
 
S

Steven D'Aprano

root@secure [~]# which python3
/usr/local/bin/python3
root@secure [~]# where pyhton3
-bash: where: command not found

That just means that you don't have the "where" command installed. Oh
well, if it's not installed you can't use it. (I don't have it installed
on any of my systems either.)

also how can a link the newset python to just /usr/bin/python.

Don't do that, you will break your system. The OS expects the python
command to be Python 2, not Python 3, and ESPECIALLY not an alpha-quality
version 3.4.

If you decide to ignore this advice, and break your system, don't bother
ask for help here. You won't get any from me.

here is what i tried

root@secure [~]# ln -s /usr/local/bin/python3 /usr/bin/python ln:
creating symbolic link `/usr/bin/python': File exists root@secure [~]#

That's not a Python issue, that's a basic Linux sys admin issue. Go buy
yourself a book on Linux and study that. Or do some googling. Read the
man page for ln. Or just spend three seconds thinking about what an error
message like "File exists" could possibly mean.

Really Nikos, you're not a beginner at this. Your English is excellent.
Between simple logic and Google, you ought to be able to work out what
"File exists" means faster than writing a post and sending it here.
 
S

Steven D'Aprano

$ mkdir temp
$ cd temp
$ wget http://www.python.org/ftp/python/3.4/Python-3.4.tar.bz2 $ tar
-xjvf Python-3.4.tar.bz2
$ cd Python-3.3.2
$ ./configure
$ make && make test
$ su
# make install
# exit
$ $ cd ../ && rm -rf Python-3.4


root@secure [/home/nikos/www/cgi-bin]# python3 -V Python 3.4.0a4


can yu please tell me where python 3.4a was placed in the system?

i tried

#!/usr/bin/python3
#!/usr/local/bin/python3

And did they work? What result did you get? You've been here long enough
that you ought to know better than to post a question like this without
showing the actual error that you received.

and also is there a way to call it like #!/usr/bin/python

Of course there is, but only if you wish to break your system. The OS
will be expecting /usr/bin/python to be Python 2. Leave it be.

i know it can be done via ln 0s but i have to know where the newest
python got installed.

Here's one way (although not the best):

sudo updatedb
locate python | grep bin

Or, you can start up the Python version of your choice, then do:


py> import sys
py> sys.executable
'/usr/local/bin/python2.5'
 
F

Ferrous Cranus

Στις 13/11/2013 6:13 μμ, ο/η Steven D'Aprano έγÏαψε:
Of course there is, but only if you wish to break your system. The OS
will be expecting /usr/bin/python to be Python 2. Leave it be.

Okey i will leave it be although i dislike the idea of using the shebang
constructor as #~/usr/local/bin/python3

Is there any way that i can use it as it was #!/usr/bin/python but
firing python3 instead of python 2.6.6 ?

Also i'm tryong 'yum install python-pip' because some modules like
'pymysql' and 'pygeoip' are missing but CentOS doesn't seem able to
detect it.

Please help me install 'pip' so i can install the modules.
 
N

Ned Batchelder

Στις 13/11/2013 6:13 μμ, ο/η Steven D'Aprano έγÏαψε:


Okey i will leave it be although i dislike the idea of using the shebang
constructor as #~/usr/local/bin/python3

Is there any way that i can use it as it was #!/usr/bin/python but
firing python3 instead of python 2.6.6 ?

No, you can't. "python" should mean Python 2.x. If you want to use Python3, invoke it as "python3".

BUT: you should have a good reason to switch to Python 3. Your existing Python programs WILL NOT WORK with Python 3. They will require porting from Python 2 to Python 3, and that is not always a simple task, especially whenyou are dealing with text, such as on a web site.

I strongly recommend that you stay on Python 2, and focus on other concerns.. "I want the latest Python" is probably not a good enough reason to switch.

--Ned.
 
C

Chris “Kwpolska†Warrick

Στις 13/11/2013 6:13 μμ, ο/η Steven D'Aprano έγÏαψε:




Okey i will leave it be although i dislike the idea of using the shebang
constructor as #~/usr/local/bin/python3
Is there any way that i can use it as it was #!/usr/bin/python but firing
python3 instead of python 2.6.6 ?

You can link it to /usr/bin/python3. There should be no problem when
you do this.
Also i'm tryong 'yum install python-pip' because some modules like 'pymysql'
and 'pygeoip' are missing but CentOS doesn't seem able to detect it.

That should install it for the Python 2.6.6 you have, and possibly
under the name `python-pip` because of various shenanigans in the
redhatesque repos.
Please help me install 'pip' so i can install the modules.

http://www.pip-installer.org/en/latest/installing.html#install-or-upgrade-setuptools

Get ez_setup.py and get-pip.py, and run them with the desired Python.
 
F

Ferrous Cranus

Στις 13/11/2013 7:45 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:
You can link it to /usr/bin/python3. There should be no problem when
you do this.


That should install it for the Python 2.6.6 you have, and possibly
under the name `python-pip` because of various shenanigans in the
redhatesque repos.


http://www.pip-installer.org/en/latest/installing.html#install-or-upgrade-setuptools

Get ez_setup.py and get-pip.py, and run them with the desired Python.


Why can't i just use that?

root@secure [~]# sudo yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.plusline.de
* extras: mirror.skylink-datacenter.de
* updates: ftp.plusline.de
base


| 3.7 kB 00:00
extras


| 3.4 kB 00:00
updates


| 3.4 kB 00:00
Setting up Install Process
No package python-pip available.
Error: Nothing to do
root@secure [~]#

'python-pip' is something that all repos should have, why it cannot be
found?
 
J

Johannes Findeisen

Στις 13/11/2013 7:45 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:>
Get ez_setup.py and get-pip.py, and run them with the desired Python.


Why can't i just use that?

root@secure [~]# sudo yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.plusline.de
* extras: mirror.skylink-datacenter.de
* updates: ftp.plusline.de
base


| 3.7 kB 00:00
extras


| 3.4 kB 00:00
updates


| 3.4 kB 00:00
Setting up Install Process
No package python-pip available.
Error: Nothing to do
root@secure [~]#

'python-pip' is something that all repos should have, why it cannot be
found?

Please try to figure out your distribution specific stuff by
using a search engine! This was what I found as first result by
searching for "centos pip" at Google:

http://superuser.com/questions/292378/how-to-install-pip-and-easy-install-on-centos

This really is not a Python question but a CentOS issue!

Regards,
Johannes
 
F

Ferrous Cranus

Στις 13/11/2013 11:30 μμ, ο/η Johannes Findeisen έγÏαψε:
Στις 13/11/2013 7:45 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:>
Get ez_setup.py and get-pip.py, and run them with the desired Python.


Why can't i just use that?

root@secure [~]# sudo yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.plusline.de
* extras: mirror.skylink-datacenter.de
* updates: ftp.plusline.de
base


| 3.7 kB 00:00
extras


| 3.4 kB 00:00
updates


| 3.4 kB 00:00
Setting up Install Process
No package python-pip available.
Error: Nothing to do
root@secure [~]#

'python-pip' is something that all repos should have, why it cannot be
found?

Please try to figure out your distribution specific stuff by
using a search engine! This was what I found as first result by
searching for "centos pip" at Google:

http://superuser.com/questions/292378/how-to-install-pip-and-easy-install-on-centos

This really is not a Python question but a CentOS issue!

Regards,
Johannes


I have foung this link myself in the morning but it wasnt successfull:

Look:

root@secure [~]# /usr/local/bin/easy_install pip
-bash: /usr/local/bin/easy_install: No such file or directory

root@secure [~]# /usr/bin/easy_install pip
-bash: /usr/bin/easy_install: No such file or directory

If i cannot use 'yum' or even 'easy_setup' how will i install 'pip' and
hence the modules?
 
N

Ned Batchelder

Στις 13/11/2013 11:30 μμ, ο/η Johannes Findeisen έγÏαψε:
Στις 13/11/2013 7:45 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:>
Get ez_setup.py and get-pip.py, and run them with the desired Python.



Why can't i just use that?

root@secure [~]# sudo yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.plusline.de
* extras: mirror.skylink-datacenter.de
* updates: ftp.plusline.de
base


| 3.7 kB 00:00
extras


| 3.4 kB 00:00
updates


| 3.4 kB 00:00
Setting up Install Process
No package python-pip available.
Error: Nothing to do
root@secure [~]#

'python-pip' is something that all repos should have, why it cannot be
found?

Please try to figure out your distribution specific stuff by
using a search engine! This was what I found as first result by
searching for "centos pip" at Google:

http://superuser.com/questions/292378/how-to-install-pip-and-easy-install-on-centos

This really is not a Python question but a CentOS issue!

Regards,
Johannes


I have foung this link myself in the morning but it wasnt successfull:

Look:

root@secure [~]# /usr/local/bin/easy_install pip
-bash: /usr/local/bin/easy_install: No such file or directory

root@secure [~]# /usr/bin/easy_install pip
-bash: /usr/bin/easy_install: No such file or directory

If i cannot use 'yum' or even 'easy_setup' how will i install 'pip' and
hence the modules?

Nikos, we've talked about this before. These aren't Python questions. Youneed to fix your OS. We can't help you with that. I know you are frustrated and want answers, but you can't just post the same question here again and expect a response. You need to solve this some other way.

Asking over and over again will simply cause another fight on this list, and no one wants that. Find another way to solve your problem.

--Ned.
 
F

Ferrous Cranus

Στις 13/11/2013 11:44 μμ, ο/η Ned Batchelder έγÏαψε:
Στις 13/11/2013 11:30 μμ, ο/η Johannes Findeisen έγÏαψε:
Στις 13/11/2013 7:45 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:>
Get ez_setup.py and get-pip.py, and run them with the desired Python.



Why can't i just use that?

root@secure [~]# sudo yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.plusline.de
* extras: mirror.skylink-datacenter.de
* updates: ftp.plusline.de
base


| 3.7 kB 00:00
extras


| 3.4 kB 00:00
updates


| 3.4 kB 00:00
Setting up Install Process
No package python-pip available.
Error: Nothing to do
root@secure [~]#

'python-pip' is something that all repos should have, why it cannot be
found?

Please try to figure out your distribution specific stuff by
using a search engine! This was what I found as first result by
searching for "centos pip" at Google:

http://superuser.com/questions/292378/how-to-install-pip-and-easy-install-on-centos

This really is not a Python question but a CentOS issue!

Regards,
Johannes


I have foung this link myself in the morning but it wasnt successfull:

Look:

root@secure [~]# /usr/local/bin/easy_install pip
-bash: /usr/local/bin/easy_install: No such file or directory

root@secure [~]# /usr/bin/easy_install pip
-bash: /usr/bin/easy_install: No such file or directory

If i cannot use 'yum' or even 'easy_setup' how will i install 'pip' and
hence the modules?

Nikos, we've talked about this before. These aren't Python questions. You need to fix your OS. We can't help you with that. I know you are frustrated and want answers, but you can't just post the same question here again and expect a response. You need to solve this some other way.

Asking over and over again will simply cause another fight on this list, and no one wants that. Find another way to solve your problem.

--Ned.


If i knew how to solve this Ned i wouldn't be asking you. My provider
haven't replied back to me.

Actually it is a python question regarding a python installation issue.
Is it so much trouble to help me with this?
 
M

Mark Lawrence

Στις 13/11/2013 11:30 μμ, ο/η Johannes Findeisen έγÏαψε:
Στις 13/11/2013 7:45 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:>
Get ez_setup.py and get-pip.py, and run them with the desired Python.



Why can't i just use that?

root@secure [~]# sudo yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.plusline.de
* extras: mirror.skylink-datacenter.de
* updates: ftp.plusline.de
base


| 3.7 kB 00:00
extras


| 3.4 kB 00:00
updates


| 3.4 kB 00:00
Setting up Install Process
No package python-pip available.
Error: Nothing to do
root@secure [~]#

'python-pip' is something that all repos should have, why it cannot be
found?

Please try to figure out your distribution specific stuff by
using a search engine! This was what I found as first result by
searching for "centos pip" at Google:

http://superuser.com/questions/292378/how-to-install-pip-and-easy-install-on-centos


This really is not a Python question but a CentOS issue!

Regards,
Johannes


I have foung this link myself in the morning but it wasnt successfull:

Look:

root@secure [~]# /usr/local/bin/easy_install pip
-bash: /usr/local/bin/easy_install: No such file or directory

root@secure [~]# /usr/bin/easy_install pip
-bash: /usr/bin/easy_install: No such file or directory

If i cannot use 'yum' or even 'easy_setup' how will i install 'pip' and
hence the modules?

I really don't believe this, 24 lines above this one is the link to a
page telling you how to do it, but you're *STILL* asking!!! What do you
want, jam on it???
 
F

Ferrous Cranus

Στις 13/11/2013 11:56 μμ, ο/η Mark Lawrence έγÏαψε:
Στις 13/11/2013 11:30 μμ, ο/η Johannes Findeisen έγÏαψε:
Στις 13/11/2013 7:45 μμ, ο/η Chris “Kwpolska†Warrick έγÏαψε:>
Get ez_setup.py and get-pip.py, and run them with the desired Python.



Why can't i just use that?

root@secure [~]# sudo yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.plusline.de
* extras: mirror.skylink-datacenter.de
* updates: ftp.plusline.de
base


| 3.7 kB 00:00
extras


| 3.4 kB 00:00
updates


| 3.4 kB 00:00
Setting up Install Process
No package python-pip available.
Error: Nothing to do
root@secure [~]#

'python-pip' is something that all repos should have, why it cannot be
found?

Please try to figure out your distribution specific stuff by
using a search engine! This was what I found as first result by
searching for "centos pip" at Google:

http://superuser.com/questions/292378/how-to-install-pip-and-easy-install-on-centos



This really is not a Python question but a CentOS issue!

Regards,
Johannes


I have foung this link myself in the morning but it wasnt successfull:

Look:

root@secure [~]# /usr/local/bin/easy_install pip
-bash: /usr/local/bin/easy_install: No such file or directory

root@secure [~]# /usr/bin/easy_install pip
-bash: /usr/bin/easy_install: No such file or directory

If i cannot use 'yum' or even 'easy_setup' how will i install 'pip' and
hence the modules?

I really don't believe this, 24 lines above this one is the link to a
page telling you how to do it, but you're *STILL* asking!!! What do you
want, jam on it???


But i have gone to the link and did what it said and it didn't proved
usefull thats why i re-ask.
 
J

Johannes Findeisen

Στις 13/11/2013 11:56 μμ, ο/η Mark Lawrence έγÏαψε:

But i have gone to the link and did what it said and it didn't proved
usefull thats why i re-ask.

Try looking for a package named "setuptools". I think that is the
package you are missing for installing pip. I don't know anything about
the current CentOS release so may it will not be available via yum.

Good luck!

Regards,
Johannes
 
N

Ned Batchelder

Wrong. You've once again not bothered to read the information that's
been handed to you on a plate. If you'd followed the instructions you
would not get the "No such file or directory" error shown above. I'm
not going to spoon feed you, so please go away and sort this out for
yourself, we're sick to death of seeing you here.

Mark Lawrence

Mark, language like that has no place on this list. Whatever problems are happening here, you are not helping to solve them. Please stop. Think about what you want this list to be like, and write when you can make a positive contribution to that effect.

http://www.python.org/psf/codeofconduct/

--Ned.
 
D

Denis McMahon

root@secure [/home/nikos/www/cgi-bin]# python3 -V Python 3.4.0a4

Let me just check.

Nobody is so stupid as to run alpha software on a production server[1]
are they?

[1] In this context, "production server" means any system facing the
public internet upon which python code is executed in response to inputs
from the public internet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top