As such, to lean into the preferred Python nomenclature, you can use the venv module directly to create Python 3.4 virtual environments: python3.4 -m venv /path/to/venv34dirname pyvenv was the “recommended tool” for this initially, though it is deprecated in Python 3.6. Since 3.3, Python supports creating virtual environments without an external module like virtualenv. This was only available recently (late 2016) previously you had to manually install and deal with /usr/bin/pip being overwritten. If you want to install pip, simply yum install python34-pip and it will install at /usr/bin/pip3 and /usr/bin/pip3.4, leaving /usr/bin/pip alone as that is part of the python2-pip package. rpm -q epel-release || yum -q -y install epel-release In CentOS 7, you can run Python 3.4 alongside Python 2.7 as it is available in EPEL. We’ll discuss a couple of different ways to run these programs together with minimal customization. I’ve only deployed a handful of Python applications, and was not interested in keeping up with source-compiled dependencies to support this small project over time. I recently needed to run a Python 3 application via uWSGI on CentOS 7 and was frustrated at how many search results were recommending building uWSGI from source when it’s available in EPEL. Wherever I can, I avoid compiling applications from source or packaging up my own versions of things that exist in popular repositories.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |