hi,
I have a strange problem.
I am playing around with some neural network examples, in particular this 1
Python is running and working fine but for some reason it has problems with tensorflow when I run it from Amibroker. If I run the code from the Python console everything works fine. And when I run it from within Amibroker on a second computer I also have no problems. It is just on my test computer where it can not find keras.
Only thing that is strange is that when I load keras and tensorflow on the console it is loaded from 2 separate directories ("Roaming" and "Local") on the problem computer and on the computer that works it load both from the "Roaming" directory. So this is the only difference.
>>> ks
<module 'keras' from 'C:\\Users\\win 10\\AppData\\Roaming\\Python\\Python38\\site-packages\\keras\\__init__.py'>
>>> tf
<module 'tensorflow' from 'C:\\Users\\win 10\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\tensorflow\\__init__.py'>
>>>
I un-installed Python, then removed all the remaining directories after I removed Python. Then re-installed Python and installed, numpy, pandas, scipy, sklearn, and tensorflow. All have the same versions on both computers. I added all the necessary paths to the environment variables. And other AFL files in which I call Python code works. Just not the tensorflow stuff.
When i type in from the Python console:
from keras.layers import LSTM, Dense
there is no problem. But when I try to load it using Amibroker it says: ModuleNoFoundError No module named keras
But this is only on 1 computer. On the other computer I do not have this problem.
So the strange thing is that it works from the Python console but not when I call it from within Amibroker. Like I said the path information I put inside the "environment variables". All the package files are the same on both computers (and also the same versions). When I type in CMD console of windows
C:\Users\win 10>pip list
it shows the same packages on both computers and same versions. Only thing that is different is the location where everything is installed. I did not do this on purpose, it did this automatically. But since I added these directories to the Path and also because it runs without a problem from the console it should work.
Anyone has an idea?
I know it is probably an impossible question but who knows maybe someone knows