Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Delete a Python virtual environment
ResourceFunction["DeletePythonVirtualEnvironment"]["uuid"] deletes the Python virtual environment with the specified registration UUID. |
|
ResourceFunction["DeletePythonVirtualEnvironment"]["executable"] deletes the virtual environment corresponding to the executable Python file. |
|
ResourceFunction["DeletePythonVirtualEnvironment"]["dir"] deletes the virtual environment in the directory "dir". |
Create a Python virtual environment and delete it by its UUID:
In[1]:= |
|
Out[1]= |
|
In[2]:= |
|
Out[2]= |
|
Delete by the directory name:
In[3]:= |
|
In[4]:= |
|
Out[4]= |
|
In[5]:= |
|
Out[5]= |
|
Delete by the executable file location:
In[6]:= |
|
Out[6]= |
|
In[7]:= |
|
Out[7]= |
|
In[8]:= |
|
Out[8]= |
|
CreatePythonVirtualEnvironment automatically creates intermediate directories:
In[9]:= |
|
Out[9]= |
|
In[10]:= |
|
Out[10]= |
|
DeletePythonVirtualEnvironment, on the other hand, deletes only the directory that contains the environment, leaving the intermediate directories in place:
In[11]:= |
|
Out[11]= |
|
In[12]:= |
|
Out[12]= |
|
Delete the directories to clean up:
In[13]:= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License