#🔒 OSError: [WinError 126] The specified module could not be found. Error loading (Pytorch issue)

8 messages · Page 1 of 1 (latest)

keen trellis
#

Does anyone know how to fix this problem? Here are my pip installs:

appdirs              1.4.4
beautifulsoup4       4.12.3
certifi              2024.2.2
charset-normalizer   3.3.2
cloudpickle          3.0.0
contourpy            1.2.1
cycler               0.12.1
Farama-Notifications 0.0.4
filelock             3.14.0
fonttools            4.51.0
frozendict           2.4.4
fsspec               2024.3.1
gym                  0.26.2
gym-notices          0.0.8
gymnasium            0.29.1
html5lib             1.1
idna                 3.7
intel-openmp         2021.4.0
Jinja2               3.1.4
kiwisolver           1.4.5
lxml                 5.2.2
MarkupSafe           2.1.5
matplotlib           3.8.4
mkl                  2021.4.0
mpmath               1.3.0
multitasking         0.0.11
networkx             3.3
numpy                1.26.4
packaging            24.0
pandas               2.2.2
peewee               3.17.5
pillow               10.3.0
pip                  24.0
pyparsing            3.1.2
python-dateutil      2.9.0.post0
pytz                 2024.1
requests             2.31.0
six                  1.16.0
soupsieve            2.5
stable-baselines3    2.2.1
sympy                1.12
ta                   0.10.2
tbb                  2021.12.0
torch                2.3.0
typing_extensions    4.11.0
tzdata               2024.1
urllib3              2.2.1
webencodings         0.5.1
yfinance             0.2.36
empty monolithBOT
#

@keen trellis

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

keen trellis
#

Here is the effective error:
It gives me this error when I run a simple program:

Traceback (most recent call last):
  File "c:\Users\chall\Desktop\dev\algorithmicStockTrader.py", line 9, in <module>
    from stable_baselines3.common.vec_env import DummyVecEnv
  File "C:\Users\chall\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\stable_baselines3\__init__.py", line 3, in <module>
    from stable_baselines3.a2c import A2C
  File "C:\Users\chall\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\stable_baselines3\a2c\__init__.py", line 1, in <module>
    from stable_baselines3.a2c.a2c import A2C
  File "C:\Users\chall\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\stable_baselines3\a2c\a2c.py", line 3, in <module>
    import torch as th
  File "C:\Users\chall\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\__init__.py", line 141, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\chall\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\lib\shm.dll" or one of its dependencies.
#

It simply has an issue at the import stage, of these:

#
import yfinance as yf
import datetime as dt
from datetime import timedelta
import pandas as pd
import ta
import numpy as np
import gym
from gym import spaces
from stable_baselines3.common.vec_env import DummyVecEnv
from stable_baselines3 import PPO
#

Any help would be greatly appreciated... thank you

empty monolithBOT
#

@keen trellis

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.