Once you open a package details page you can click on list of files and find out whether the files are in /usr/lib/python2.7 or in /usr/lib/python3.
Install python 2.7 ubuntu server 14.04 how to#
Previously I wrote a (long) post about how to Install Python packages on Ubuntu 14.04, which provides lots of detail about how I approach Python package installation.In particular, I use pip and install as a user. In this post I will describe installing python-igraph on Ubuntu 14.04, using the default Python 2.7. Unfortunately the dpkg -L works only on installed packages so if you want to check it before you install the package you will have to use the Ubuntu packages web interface. Install igraph for Python on Ubuntu 14.04. If however you want to check that further you can use dpkg -L python-reportlab - this will list the package contents and you will see that the files are in /usr/lib/python2.7. It is fair to assume that package python-reportlab is the 2.7 version and package python3-reportlab is the python 3.x version. On my system this produces: gambas3-gb-report On Debian/Ubuntu, the python version can be determined like this. Reading the description makes it sound as if HTTPS URLs cannot be retrieved in a safe manner with python 2.7.6 unless I install PyOpenSSL.
For example if you want to install the right version of reportlab use: apt-file -l search reportlab InsecurePlatformWarning on Ubuntu 14.04 w/ Python 2.7.6. Following the style outlined in my Install Python packages on Ubuntu 14. To do this the oauth2 package needs to be installed. The first assignment for Coursera’s Introduction to Data Science focuses on sentiment analysis of twitter data. If you are like me and don’t need to be on the latest and greatest OS, but want to be able to use scripts like this, hopefully this will help.Use apt-file to find out the package name. Install oauth2 Python package on Ubuntu 14.04. 14.04 will continue to receive updates until 2019 as it is an “LTS” release and I anticipate migrating off the server by then anyway. I tried and many services failed to load or lost their config after the upgrade, so I rolled back to a snapshot.
Install python 2.7 ubuntu server 14.04 upgrade#
Some may be wondering why I didn’t just upgrade my VM to Ubuntu 16.04. This will run the script every day at 2:40 pm. In order to automate this, you’ll want to add a cron job. For example I have to run:Ĥ0 14 * * * /usr/local/lib/python2.7.12/bin/python /media/backups/pfsense-backup-master/pfsense_backup.py Whether you are running this manually or automated you will need to specify the path for Python 2.7.9+ as it is not necessarily invoked by default by the “python” command. Sudo apt-get install python2.7 python-pipīefore running the script, make sure you edit it to point to your pfSense box’s IP address (and https port if necessary) and supply the correct credentials. Sudo add-apt-repository ppa:fkrull/deadsnakes To install python 2.7.12 and mechanize and meet all requirements of this script run the following commands:
The ppa specified is not being maintained and the fkrull/deadsnakes ppa should be used instead. James has updated the README.md to indicate this requirement but his instructions are a bit out of date. I reported this issue on James’ Github and he suggested installing Python 2.7.9 or later from another ppa as coding around the issue would require a complete rewrite of the script.
I quickly found out that this was due to my OS running Python 2.7.6 and SSLContext was introduced Python 2.7.9. I unfortunately received the following error:ĪttributeError: 'module' object has no attribute '_create_unverified_context' I downloaded the script and changed the necessary options to point it to my pfSense box and supplied the credentials necessary for backup. Sure, you can backup manually from the GUI, but I don’t trust myself to remember to do that after time I make a change to my config. I was excited because pfSense didn’t (and still doesn’t) have a built in backup scheduler. You can install it by typing: sudo apt-get install python3-pip But, but, I just did that Here are my pythons: python -V Python 2.7.6 python3 -V Python 3.4.3 Whats happening Cant tell whether this is a pip or apt-get issue. Back in mid 2016 Github user James Lavoy released a python script to backup pfSense. OK, so it should be installed: pip3 The program pip3 is currently not installed.