So lets just use the binary that works better: export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATHĬommands installed by pip3 will be available in the ~/Library/Python/3.7/bin/ folder, so just add it to your PATH: export PATH=$PATH:~/Library/Python/3.7/bin/ The one that gets installed on /usr/bin/python3 has problems loading some libraries and instrumentation with install_name_tool would be required. LDFLAGS="-L/Library/Developer/CommandLineTools/Library/Frameworks/amework/Versions/3.7/lib" \įor some reason, Apple installs many different Python 3 binaries in different places of the system. Set yourself at home and install them with pip3.įor modules that require compilation and special library, say crypto, do it like this: CFLAGS="-I/Library/Developer/CommandLineTools/Library/Frameworks/amework/Versions/3.7/include" \ For my personal use, I need the complete machine learning, data wrangling and Jupyter suite: pip3 install -user sqlalchemyīut you might need other things as Django or other sqlalchemy drivers. Don’t forget to use –user to get things installed on your home folder so you won’t pollute your overall system. Now that you get a useful Python 3 installation, use pip3 to install Python modules that you’ll need. Rm -rf $/Library/Caches/pip Install Python Modules In case you already have Python installed under your user and modules downloaded with pip, remove it: If you already have complete Xcode installed, this step was unnecessary (you already had Python 3 installed) and you can continue to the next section of the tutorial. Settings window will pop so wait 5 minutes for the installation to finish. This way, every time Apple releases an update, you’ll get it. ![]() To get it installed (without the heavy Xcode GUI), type this in your terminal: xcode-select -install Python 3 is shipped by Xcode Command Line Tools. You don’t need to get the awful Anaconda on you Mac to play with Python. But you can still get 3 from Apple, updated regularly through system’s official update methods. MacOS Catalina doesn’t ship with Python 3, only 2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |