Opentrons / opentrons

Software for writing protocols and running them on the Opentrons Flex and Opentrons OT-2
https://opentrons.com
Apache License 2.0
415 stars 177 forks source link

bug: "Override path to python" not working #15138

Open steakhouserodriguez opened 4 months ago

steakhouserodriguez commented 4 months ago

Overview

The setting has no effect, even after restarting the app and computer.

Steps to reproduce

image
#otpython.py
metadata = {
    "protocolName": "otpython",
    "apiLevel": "2.17",
}

import sys
raise Exception(sys.executable)

def run(ctx):
    pass

Current behavior

protocol analysis should use my interpreter, not the bundled.

image

Expected behavior

Should be

/opt/miniconda3/envs/ivynatal_lab/bin/python3

Operating system

Mac

System and robot setup or anything else?

I'm using miniconda? App version 7.2.2

warmsoymilk commented 2 months ago

Any update on this? I'm having the same issue.

koji commented 2 months ago

@steakhouserodriguez Could you check one thing?

There is the config file of the app and the following is the file path.

Library/Application\ Support/Opentrons/config.json

You can access to the folder from Terminal or Finder. Once you can access the folder, could open config.json via an editor and check the following item?

If pathToPythonOverride isn't the path you want to use, could you update that value and reboot the Desktop app?

In my case, I use python via asdf and it works.

"python": {
   "pathToPythonOverride": "/Users/koji/.asdf/shims"
 },

If this doesn't work, could you reach out to our support team?

steakhouserodriguez commented 2 months ago

yeah, config.json has the path I submitted. I've just emailed support@.

koji commented 1 month ago

@steakhouserodriguez

if you type which python, is the output path is the same as the path you submitted?

steakhouserodriguez commented 1 month ago

Hmm, I've ended up setting the environment to envs/ivynatal_lab instead of envs/ivynatal_lab/bin and it seems to work now. I'm 75% sure I did try this in the past without success, but I can't reproduce the issue anymore.

@steakhouserodriguez

if you type which python, is the output path is the same as the path you submitted?

I'm not sure if its relevant at this point, but the output paths would correspond to the environment's python path. I don't have python installed in system path.

koji commented 1 month ago

@steakhouserodriguez Thank you for the update.