Git Product home page Git Product logo

Comments (7)

aaronespasa avatar aaronespasa commented on July 23, 2024 2

@Sargnec Do not remove the existing python. Link [email protected] with the command brew link --overwrite --dry-run [email protected] to avoid having the symlink error (--dry-run will let you know which files will be removed). You can find more about this issue in StackOverflow: How to symlink python in Homebrew?.

Then, try to install the certificates.

After doing that, keep in mind that Python 3.9.9 will generate some conflict at the time of making the models because it can't find the last version of torchvision. So you will have to downgrade Python to the version 3.9.5 and be sure that the command python3 -V outputs the version 3.9.5 of Python. You can follow the steps that I indicated on the first comment to create this alias temporally.

from playtorch.

Sargnec avatar Sargnec commented on July 23, 2024 2

Thank you @aaronespasa @liuyinglao. At first try nothing changed it was giving me same errors

python3.9: posix_spawn: /Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python: Undefined error: 0

but today I tried again and I was able to install certificates and right now ImageClassificationTutorial app is working for me.

from playtorch.

liuyinglao avatar liuyinglao commented on July 23, 2024 1

Hi @Sargnec

Thanks for using Pytorch Live! As @aaronespasa mentioned, this seems to be python version issue and his suggestion seems mostly right! And after you configure the python version correctly on you machine, here are the steps you may want to rerun within your project to re-create the ptl files:

https://github.com/pytorch/live/blob/main/react-native-template-pytorch-live/script.js#L20-L24

Please let us know how does that work for you! Thanks!

from playtorch.

aaronespasa avatar aaronespasa commented on July 23, 2024

Hi @Sargnec ,

The error is due because you didn't install the certificates for Python after installing it locally (its post-installation). You can read more about it in the next link: urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error.

I recommend you to install Python 3.9.5.

See that, after installing Python, the installer asks you to Install the necessary certificates:
Screenshot 2022-01-10 at 01 31 04

⚠️ Make sure the command python3 references to this installation of Python 3.9.5 (use the command python3 -V on the terminal. If it outputs the version 3.9.5 of Python, it's fine) . That's because, for the moment, the python3 command is used to make the models. As a temporal solution, you can add the line alias python3=<python folder> substituting <python folder> by the path of your local installation of Python like /usr/local/bin/python3. You can see this by opening the Python Launcher and copying the path after Interpreter.

As soon as I have time to work on it, I'll create a Python Installer on #9 to avoid having this kind of issue.

Thanks for reporting it! 😊

from playtorch.

Sargnec avatar Sargnec commented on July 23, 2024

I did try both 3.9.5 and 3.9.4 and when I click on Install certificate it gives this

python3.9: posix_spawn: /Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python: Undefined error: 0

Btw I'm on macos m1

from playtorch.

aaronespasa avatar aaronespasa commented on July 23, 2024

What's the output of the terminal when you write which python ?

At first it seems that your Python installation is broken (the default Python 2.7 installation that comes with your Mac).
You can try install Python using Homebrew: brew install python.

Then, make sure /usr/local/bin is added to PATH. You can add it manually with the command export PATH=$PATH:/usr/local/bin.

After that, try installing the certificates.

And don't worry, it is not an Apple Silicon problem. I'm also using an M1 MacBook.

Hope it works this time @Sargnec ! 😁

from playtorch.

Sargnec avatar Sargnec commented on July 23, 2024

Screen Shot 2022-01-11 at 02 34 57

Do I remove existing python and link [email protected]? @aaronespasa
And thank you for your help

from playtorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.