4/30/2023 0 Comments Upgrade python linux![]() If you get an error here, saying that you need to install pip first, go ahead and do so. In Python 2 you’ll want to install virtualenv using pip: pip install virtualenv The first thing to do is set up a virtual environment. It’s a good idea to keep track of these in a text file that can be used by pip to install them later. Any of the packages you get from the package index, for example, will need to be installed on your production machine as well. You have to remember that for any version of Python, you are going to need to deploy that same setup to your production environment. Setting up a proper environment for working is going to be important, and can be confusing at first, because you might think you are ready to write with it simply installed on your machine. One of the great things about Python is that it is fantastically simple to get working this simplicity is also one of the pitfalls. If you are missing one or the other, or if you find you are running an older version, just install the newest: sudo apt-get install python *or* python# Environments matter Just remember which one your machine defaults to, and which one you are wanting to target. ![]() ![]() There’s a whole different article to be written about changing your default Python install, so I’m going to avoid that discussion here. This will be important because it will determine how we run our Python code from whatever interpreter we end up using. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |