4/16/2023 0 Comments Macvim package via homebrewOK, so I start with what I refer to as a ’essential packages’, and specifically these are packages that do not require any configuration on my part. If you need to update Homebrew you can execute a brew update command, but the installation will install the latest version any way, so that won’t be necessary. Note: notice that installation command uses the default installation of Ruby which Homebrew presumes is available (and for the most part is a safe presumption to make as Ruby as been provided by macOS for the longest time). To install Homebrew, execute the following command in your terminal: /usr/bin/ruby -e "$(curl -fsSL )" In fact, I’m not actually sure what alternatives to Homebrew exist (other than MacPorts, which if you want to understand the differences between it and Homebrew then read this)? On Linux you have tools such as yum or apt but for macOS you either use the built-in App Store or find your own alternative (so in this case, we’ll use Homebrew). So we have to download our own package manager, and the defacto standard for macOS is a program called Homebrew (which is a terminal based tool, so no GUI). Note: there are many apps that aren’t available in the App Store because Apple can be a bit anti-competition (see Spotify’s “time to play fair” campaign). The macOS provides its own GUI implementation referred to as the ‘App Store’, but it’s heavily moderated by Apple and an app can only be found there if it abides by Apple’s own set of rules and criteria for what they consider to be ‘safe’ software. This software will enable us to search and install various pieces of software. Let’s begin our journey by first installing a ‘package manager’. The situation reminds me a lot of XKCD’s classic comic strip… Package Manager versions of Python 3 and then subsequently using multiple environment tools like pipenv which confuse things further by hiding the actual versions behind the generically named python command. This is why, when setting up a new laptop, getting a good development environment setup is essential because it can get quite confusing untangling a mess of default Python’s vs brew install. So within that virtual env if you call python, then you may not necessarily get the Python2 interpreter, as your virtual env might be configured such that the expectation is to proxy your invocation to a Python3 interpreter. Users/integralist/.pyenv/shims/python) and that shim script will then determine which Python interpreter/binary to execute.Ī shim script typically identifies the virtual environment you’re working under and will then figure out the most appropriate Python interpreter to invoke. A tool like pipenv will proxy a command such as python through a shim script (e.g. This has been the generally accepted rule for a while, except! when dealing with tools that handle virtual environments.įor example, pipenv is a tool that helps you to manage not only different Python versions but also the dependencies installed for different projects (referred to as virtual environments). python -version) I was fairly certain it would be a 2.x version (based on the naming history). So looking above we can see which python reveals the location as /usr/bin/python and without checking the version (e.g. Where as Python 3.x has traditionally been named python3 to help distinguish the two. The binary name python generally refers to Python version 2.x. The reason I mention this is because Python has an interesting history with the name of its binaries. What’s worth me noting additionally here is that I primarily use two programming languages: Go and Python. $PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin.It’s good to begin by surveying your current system and understanding what you have already installed. Here’s a list of what we’re going to be discussing… Given a straight forward set of instructions, doing things manually doesn’t take long at all, and you can modify things at that point in time without just blindly installing various things you no longer need. I also find that if an error occurs with an automated script (unless you’ve coded things defensively enough) you can end up with your machine in a weirdly broken state. OS configurations can change substantially, as well as my preferred ways of working). I used to try and automate a lot of this with bash scripts, but realised over time that things go out of date quite quickly (e.g. This post is my attempt to capture and document my process for getting a new dev environment set-up. I’m an engineer with a new laptop, which requires setting up with various development tools and configuration.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |