Message412168
> cmd310 = ["/LIBPATH:D:\\python310\\lib\\site-packages\\torch\\lib",
The `argv` parameter of os.spawnv() should begin with a command name to ensure that the application parses its command-line correctly. This doesn't necessarily have to be a file path since the `path` argument is what gets executed. For example, in this case I would use `cmd310 = ["link", ...]`.
That said, for various reasons, including the correct quoting of command-line arguments that contain spaces, I recommend that you use the subprocess module instead of os.spawnv(). For example, use `p = subprocess.run(cmd310, executable=executable)`. The first item of the argument list still needs to be "link" in this case. Or include the full path of "link.exe" at the start of cmd310, and use `p = subprocess.run(cmd310)`.
> But i cant DEBUG os.spawnv() on Pycharm.
In Windows, os.spawnv() is a builtin function from the nt extension module, defined in Modules/posixmodule.c. It is not defined in os.py. The C implementation is a minimal wrapper around the C runtime's _wspawnv() function [1]. Probably PyCharm isn't capable of debugging a builtin function.
---
[1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/spawnv-wspawnv |
|
Date |
User |
Action |
Args |
2022-01-30 18:49:04 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, michaellongge |
2022-01-30 18:49:04 | eryksun | set | messageid: <1643568544.59.0.400881904431.issue46578@roundup.psfhosted.org> |
2022-01-30 18:49:04 | eryksun | link | issue46578 messages |
2022-01-30 18:49:04 | eryksun | create | |
|