2

I created a simple Kivy app using Anaconda (Python 3.8.8). I followed the steps listed on: https://github.com/kivy/kivy-ios to install Kivy and create an Xcode project. However, the project is created with an python version 3.8.2, which is located in /usr/bin/, but the Anaconda is located in /Users/user/opt/anaconda3/bin/python3. I've tried Conda activate base before running toolchain create <title> <app_directory>, but Xcode still uses the 3.8.2 version. This results in errors, because all packages were installed for the 3.8.8 version. When running python --version in terminal , I get Python 3.8.8

The question: how to create an Xcode project with the Python 3.8.8 version?

  • Have you tried virtual enviornment ? – Himanshu Singh Chauhan Oct 04 '21 at 10:18
  • sorry, I don't get it, what do you mean by that? – Dawid Archibald Oct 04 '21 at 14:05
  • I followed this: https://stackoverflow.com/questions/5276967/python-in-xcode-4 but now I get a new error: ```shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted``` – Dawid Archibald Oct 04 '21 at 14:28
  • 1
    Learn how to use python virtual enviornment. I think you don't know what a virtual enviornment is you can move here -> https://www.youtube.com/watch?v=N5vscPTWKOk and learn something new. – Himanshu Singh Chauhan Oct 06 '21 at 04:23
  • 2
    I think it's fair to suggest using a virtual environment. However, that does not address the issue that xcode is breaking the non-virtual python3 environment on MacOS. There is no reason `python3` should reference one version while `pip3` references another. Yes there are workarounds, and possible better practices, but the issue remains that xcode breaks the global python3 environment and I don't think that issue should be brushed aside just because you can make a virtual environment. – h0r53 May 25 '22 at 15:08

0 Answers0