SOLVED: Permission Issue with TDPyEnvManager

Hello, I am trying to run a system that runs just fine on my machine, and a friends machine. When I try to run it on a third machine, the TdPyEnvManager fails to install the libraries listed in the requirements.txt due to “permission issues”. Logs below:

TouchDesigner  Build 2025.32280 compile on Tue Jan 20 00:43:29 2026
Python 3.11.10 (heads/3.11-Derivative-dirty:e60cd070d8, Oct 10 2024, 15:55:11) [MSC v.1929 64 bit (AMD64)]

2026-06-18 12:20:17,254 - ERROR - TDAppLogger.TDPyEnvManagerHelper - Subprocess failed: Command '['C:\\mediaserver\\manager\\.venv\\Scripts\\python.exe', '-m', 'pip', 'install', '-r', 'C:\\mediaserver\\manager\\requirements.txt']' returned non-zero exit status 1.
2026-06-18 12:20:17,255 - ERROR - TDAppLogger.TDPyEnvManagerHelper - Command was ['C:\\mediaserver\\manager\\.venv\\Scripts\\python.exe', '-m', 'pip', 'install', '-r', 'C:\\mediaserver\\manager\\requirements.txt']

Only difference between my machine (working) and the other machine, is that mine is running windows 11, and the other windows 10. The machine having issues is logged in using an Admin user.

Hey,

There is no proof from these logs that it’s a permission issue.

Can you set this env variable TOUCH_APP_LOG_LEVEL=DEBUG and share the file at %LOCALAPPDATA%\Derivative\TouchDesigner099\TDLogs\TDPyEnvManagerHelper_<pid>.log

Can you also please share the requirements.txt?

Last, try to remove any .venv that’s already in the folder, if any, and try again, but it’s still failing to install the req, try, outside of TD’s context,

cd /d C:\mediaserver\manager
.\.venv\Scripts\python.exe -m pip install -r requirements.txt -v

What output do you get then?

Best,
Michel

Hi @JetXS, here’s both the log and the requirements.txt, had to zip because it wouldn’t let me upload a .log file. This is a new project, with minimal code, to isolate the issues. However I’ve kept the same requirements.txt and the same yaml file.

log_+_requirements.zip (1.8 KB)

Tried to remove completely the venv every time, nothing works. If I try to run the install outside of TD’s context, I get:

Using pip 24.0 from C:\envTest\.venv\Lib\site-packages\pip (python 3.11)
Collecting pydantic (from -r requirements.txt (line 1))
  Obtaining dependency information for pydantic from https://files.pythonhosted.org/packages/fd/7b/122376b1fd3c62c1ed9dc80c931ace4844b3c55407b6fb2d199377c9736f/pydantic-2.13.4-py3-none-any.whl.metadata
  Using cached pydantic-2.13.4-py3-none-any.whl.metadata (109 kB)
Collecting psutil (from -r requirements.txt (line 2))
  Obtaining dependency information for psutil from https://files.pythonhosted.org/packages/b4/90/e2159492b5426be0c1fef7acba807a03511f97c5f86b3caeda6ad92351a7/psutil-7.2.2-cp37-abi3-win_amd64.whl.metadata
  Using cached psutil-7.2.2-cp37-abi3-win_amd64.whl.metadata (22 kB)
Collecting GPUtil (from -r requirements.txt (line 3))
  Using cached gputil-1.4.0-py3-none-any.whl
ERROR: Could not install packages due to an OSError.
Check the permissions.
Traceback (most recent call last):
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\commands\install.py", line 377, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "C:\envTest\.venv\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "C:\envTest\.venv\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
    return bool(self._sequence)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
    return any(self)
           ^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
    candidate = func()
                ^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 182, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 228, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 290, in __init__
    super().__init__(
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
    self.dist = self._prepare()
                ^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 222, in _prepare
    dist = self._prepare_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 301, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 525, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 640, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\operations\prepare.py", line 74, in _get_prepared_distribution
    return abstract_dist.get_metadata_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\distributions\wheel.py", line 32, in get_metadata_distribution
    return get_wheel_distribution(wheel, canonicalize_name(self.req.name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\metadata\__init__.py", line 106, in get_wheel_distribution
    return select_backend().Distribution.from_wheel(wheel, canonical_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\metadata\importlib\_dists.py", line 132, in from_wheel
    with wheel.as_zipfile() as zf:
         ^^^^^^^^^^^^^^^^^^
  File "C:\envTest\.venv\Lib\site-packages\pip\_internal\metadata\base.py", line 693, in as_zipfile
    return zipfile.ZipFile(self.location, allowZip64=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Derivative\TouchDesigner.2025.32280\bin\Lib\zipfile.py", line 1295, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\users\\admin\\appdata\\local\\pip\\cache\\wheels\\2b\\4d\\8f\\55fb4f7b9b591891e8d3f72977c4ec6c7763b39c19f0861595\\gputil-1.4.0-py3-none-any.whl'

The only way I found around it is by using --no-cache-dir outside of TD’s context, but I cannot do this if I’m trying to let TD handle the whole env creation + installation.

You did not set the env variable for log levels, did you? That zip log does not tell much.

That said, it’s pretty clearly showing that it’s not TouchDesigner / TDPyEnvManager related in the second part of your post. It’s an issue with a cached wheel in the pip cache.

cd /d C:\envTest
.\.venv\Scripts\python.exe -m pip cache purge

You can then try to run TouchDesigner with an empty cache to see if the new cached files fix the issue.

Or, if that does not work, also try to run TouchDesigner with this var set: PIP_NO_CACHE_DIR=1

Best,
Michel

Hi @JetXS ,
I did set the variable, but from the logger comp, not at system level. Sorry, my bad. I have now added the env variable as you explained, and re-ran the toe file to generate a full log.

I tried clearing the cached wheel in the pip cache, the cache clears, but I get the same exact error.

I added the second var too, with no avail. Attached, both logs: one with only TOUCH_APP_LOG_LEVEL=DEBUG, one with both that and PIP_NO_CACHE_DIR=1

logs.zip (3.4 KB)

Hey @NiccoG

Both logs show a successful run.

Pip installed all requirements, including GPUtil, and TDPyEnvManager linked C:\envTest.venv successfully.

Starting the .toe file that’s relative to the yaml context file should have linked the environment with no issues and modules should be importable from within TouchDesigner.

Best,
Michel

NOTE: User marked this as the solution, assuming this got resolved and marking as such.