macos

leaving Anaconda environment in Terminal (Mac)

leaving Anaconda environment in Terminal (Mac) Question: I recently installed Anaconda on my Mac for starting to code with Python using Spyder, but decided to switch to VSCode (without starting Anaconda) which I find less confusing (I’m a casual coder). However, every time I open Terminal now on my Mac, the prompt starts with "(base)" …

Total answers: 1

Update of Xcode removes all Python packages on macOS?

Update of Xcode removes all Python packages on macOS? Question: I was using Big Sur with Python 3.8.2 (not Homebrew’s, but native OS’ Python) and I had a lot of packages installed (around 60). Now I updated my OS to Monterey 12.6 and I updated Xcode to 14.0 which updated Python to 3.9.6. And I …

Total answers: 2

The git (or python) command requires the command line developer tools

The git (or python) command requires the command line developer tools Question: This knowledge post isn’t a duplication of other similar ones, since it’s related to 12/September/2022 Xcode update, which demands a different kind of solution I have come to my computer today and discovered that nothing runs on my terminal Every time I have …

Total answers: 6

How to solve "NameError: name 'basestring' is not defined" when importing psycopg2?

How to solve "NameError: name 'basestring' is not defined" when importing psycopg2? Question: I am trying to import the psycopg2 package on python 3.7.13 but I get the following error: python -c "import psycopg2" % 11:22:56 Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/mm/.pyenv/versions/3.7.13/lib/python3.7/site-packages/psycopg2/__init__.py", line 68, in <module> from psycopg2 …

Total answers: 1

Cross-Platform Installer paths

Cross-Platform Installer paths Question: I’m writing an installer for a Python app I’m making, and needed to have paths for different file locations. These are what I have so far, and so wondered if these were correct of if I should change any of them (particularly the Linux/macOS ones) I have a path for: the …

Total answers: 1

How can I install MacVim on OSX 12.5 and get it to run the REPL for Lisp?

How can I install MacVim on OSX 12.5 and get it to run the REPL for Lisp? Question: Update: Due to a change in the default build of vim and a change in directory structure on MacOS 12.5 no longer having Python frameworks installed, SLIMV initiated REPL doesn’t work with vim of MacVim when installing …

Total answers: 2

python – symlink to another symlink without following the latter symlink

python – symlink to another symlink without following the latter symlink Question: I want to create a symbolic link (A) to another symbolic link (B) which point to an actual file (C) on macOS with python >= 3.10: A -> B -> C I tried this: from pathlib import Path A = Path(‘/path/to/src’) B = …

Total answers: 1

Why is not recommended to install poetry with homebrew?

Why is not recommended to install poetry with homebrew? Question: Poetry official documentation strictly recommends sticking with the official installer. However, homebrew has poetry formulae. brew install poetry Usually, I like to keep everything I can in homebrew to manage installations easily. What is the drawback and risks of installing poetry using homebrew instead of …

Total answers: 1