learning and installing Python 3
I need to write "trow-away" scripts (or scripts to be used only once) but for UTF-8 files and it seems that Python 3 is much better than Python 2.7 (which comes with my Debian 7 distro) for that purpose so I have followed a "how to" from a Ubuntu forum explaining how to download and install Python-3.3.5 with the following instructions for which I have absolutely no experience:
Code:
wget http://www.python.org/ftp/python/3-3.5/Python-3-3.5.tar.xz Code:
/home/user_x/Python-3.3.5 Code:
#!/home/user_x/Python-3.3.5 Code:
bash: ./test.py: /home/user_x/Python-3.3.5: bad interpreter: Permission denied Both text.py and the directory Python-3.3.5 (and its files) belong to the same user_x and group user_x. There is 2 larges files as below and subdirectory "Python" contains all the .c .h .o files. Code:
-rw-r--r-- 1 user_x user_x 17304682 May 17 21:43 libpython3.3m.a Code:
lrwxrwxrwx 1 root root 8 May 17 21:45 2to3 -> 2to3-3.3 Thank you for your help. |
I have no idea what kind of guide you followed, but it is TERRIBLE!
The way to install Python 3 on Debian is: Code:
sudo apt-get install python3 Code:
apt-get install python3 Code:
which python3 Code:
which python3 Once you get Python 3 installed correctly, you can use this at the beginning of your files: Code:
#!/usr/bin/env python3 HMW Edit: I forgot to say, "good luck and happy hacking!" Python 3 is my go-to lagnuage these days when a bash script simply isn't enough. Go for it and have fun! |
Quote:
Code:
#!/opt/python3.3/bin/python3 |
Thank you for the answers.
Quote:
|
All times are GMT -5. The time now is 04:01 AM. |