Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5002 Discussions

Profiling on python scripts created in virtual environment

Ashima
Beginner
811 Views

Hello,

In Vtune Profiler, I am trying to profile a script I have created. But all of the packages and library used in the script are installed in the virtual environment (created usinf venv).

 

Currently I am giving following input(as attached in the ss) but it is taking the python executable from the system instead of the virtual environment that I have mentioned(as can be seen in the cmd snapshot) and for the script it says that "No such file or directory" as it is created in the virtual environment.

 

Please help me out on how to proceed further.

Regards,

Ashima

openvino_env is the name of my virtual environmentopenvino_env is the name of my virtual environmentit is using system's python.exe to execute file instead of the exe I mentioned in the virtual environmentit is using system's python.exe to execute file instead of the exe I mentioned in the virtual environment

Labels (1)
0 Kudos
3 Replies
JyothisV_Intel
Moderator
753 Views

Hi,

 

Good day to you.

 

Thanks for posting in Intel Communities.

 

We tried replicating the scenario that you mentioned from our side by creating a Python venv environment and profiling a Python program inside that environment using Intel VTune Profiler 2023.2.

 

Kindly see the below screenshot of the default and the custom venv environment (test_openvino) created for this scenario. Do note that OpenVINO package is not installed in the default environment and is present only in the custom venv environment. The python version used is 3.10.11 installed using the official Python installer (not from the Microsoft Store) according to the screenshot attached by you.

JyothisV_Intel_0-1699554952616.png

 

Intel VTune Profiler analysis configuration page has been configured in the below manner to use the Python that is present in the custom environment as the Application to be analyzed and the filename of the code to be analyzed as Application Parameter:

JyothisV_Intel_1-1699554980162.png

 

The analysis was successful with OpenVINO inside the custom environment being loaded and initialized. We are unable to replicate the issue that you mentioned from our side. The code that we used to test this and the successful run is shown below for reference:

JyothisV_Intel_2-1699555046556.png

 

In order to investigate this issue further, kindly get back to us with the following information:

1. Sample reproducer code/files to replicate the issue from our side along with the Intel VTune Profiler configuration

2. Python version

3. OS and hardware details

4. We could see from the screenshot that Python is being loaded from a system path while it is being analyzed instead of taking it from the venv environment path. Have you configured or initialized any environment variables either in your Windows system/user environment variables or in your test code?

5. Any other information that you find is not corresponding to the test environment that we used to replicate this issue.

 

Thanks and Regards,

Jyothis V James

 

0 Kudos
JyothisV_Intel
Moderator
687 Views

Hi,


Good day to you.


We have not received any response from you.


Is your issues resolved? Kindly get back to us with the requested details if you are still facing issues to assist you better.


Thanks and Regards,

Jyothis V James


0 Kudos
JyothisV_Intel
Moderator
591 Views

Hi,


Good day to you.


We have not received any update from you. We hope that your issue is resolved.


This thread will no longer be monitored by Intel. If you need any assistance while using Intel products/services, kindly post a new question.


Thanks and Regards,

Jyothis V James


0 Kudos
Reply