PyCall.jl icon indicating copy to clipboard operation
PyCall.jl copied to clipboard

follow up question to issue #1017 how to run shell commands with activated env

Open AbhimanyuAryan opened this issue 3 years ago • 1 comments

once I successfully install the playwright package with PyCall.jl

pyimport_conda("playwright", "playwright", "microsoft")

I need to run this shell command in that conda env to install web drivers for playwright python package. I don't know know how to call this from Playwright.jl package which is let's say

module Playwright
#...
#...
#...

function __init__()
		copy!(playwright, pyimport(.....)
        # here I need to run `playwright install` in that env
end

#...
#...

end

This is how the python output looks like in pytest-playwright conda env

┬─[abhi@Abhimanyus-MacBook-Air:~/m/e/p/l/p/s/playwright]─[19:58:57]
╰─>$ playwright install                                                                                    (pytest-playwright) 
Downloading Chromium 107.0.5304.18 (playwright build v1028) - 119.8 Mb [====================] 100% 0.0s 
Chromium 107.0.5304.18 (playwright build v1028) downloaded to /Users/abhi/Library/Caches/ms-playwright/chromium-1028
Downloading FFMPEG playwright build v1007 - 1 Mb [====================] 100% 0.0s 
FFMPEG playwright build v1007 downloaded to /Users/abhi/Library/Caches/ms-playwright/ffmpeg-1007
Downloading Firefox 105.0.1 (playwright build v1357) - 68.5 Mb [====================] 100% 0.0s 
Firefox 105.0.1 (playwright build v1357) downloaded to /Users/abhi/Library/Caches/ms-playwright/firefox-1357
Downloading Webkit 16.0 (playwright build v1724) - 53.9 Mb [====================] 100% 0.0s 
Webkit 16.0 (playwright build v1724) downloaded to /Users/abhi/Library/Caches/ms-playwright/webkit-1724

AbhimanyuAryan avatar Dec 10 '22 14:12 AbhimanyuAryan

continuing the conversation from here: https://github.com/JuliaPy/PyCall.jl/issues/1010#issuecomment-1374852917

but yes @hhaensel I have gotten it to work on my windows machine. I am trying to understand how to install playwright drivers i.e. $playwright install from within inside of Julia while using the PyCall's conda environment. Because without the drivers the API won't work

page and all the playwright python API need to have drivers configured.

AbhimanyuAryan avatar Jan 08 '23 15:01 AbhimanyuAryan