New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation w/ Miniconda, Reticulate 1.14, Tensorflow 2.0.0 & Keras 2.2.5.0 failing #964
Comments
It seems that you have the correct version of the R package but, an older version of the python package installed. Can you try running:
This will install the 2.0.0 python package. |
Tnx for reply. I have tried that already and there were problems with R 3.6.2. So, this time, I downgraded to R 3.5.3 and started from scratch:
This installed keras 2.2.5.0, reticulate 1.14 tensorflow 2.0.0. The whole process was only interrupted by the prompt for installation of Miniconda and I did a
Again, everything run flawlessly and I did a
The usual tests led to results as follows:
Thus, while tensorflow is working as it should, keras itself has problems. And since I didn't find any indications as to the reson for this behaviour whatsoever, I really need help. Thanks in advance... |
The problem here is that for some reason you are still getting the TensorFlow v1.5 in your environment. |
Tnx for suggestions. If after
I invariably get the following results for the tests:
But then for tensorflow:
This changes into the message that tensorflow has been downgraded to v1.5 only in case of
...which I don't understand at all, but which also doesn't appear in case of For your information: Since my last attempts I have removed completely R3.5.3, Miniconda, RStudio1.2.5033 (including a thorough clean-up of all associated directories) and reinstalled R3.6.1, and again RStudio1.2.5033 as well as Miniconda by means of |
For background: Ana-/Miniconda manages Python environments for you, where each environment can have completely different Python libraries. So, please forget about the old Also, the reason to always use Now, the easiest way to do some further testing would probably involve the command line.
would "load" the respective environment. Then if you do
you should get a Python shell, and you should be able to try
Additionally - even before executing you could do
to see a list of installed libraries. Can you let us know what that yields? |
So tensorflow isn't there... can you do - right there on the command line, after
:
and if that fails, paste the error message, otherwise try importing again? |
yeah, that's the current releasè since last week if you need 2.0, do
|
Strange enough: I did another Observed error traces look similar to error report #22794, "ImportError: DLL load failed: The specified module could not be found" - with even several code line numbers coninciding. Case #22512 seems to go into a remotely similar direction. |
Whatever I do (I have changed to Anaconda3 w/ Py3.6.10, in the meantime), I end up with
and then - although
What can I do to get Tensorflow in working condition? Not to forget that I still need to get Keras working too... Please help. |
On the upside, Keras is part of TF, there'll be nothing to do there ;-) One of the issues you're linking to hints to the problem possibly being linked to Windows GPU binaries now requiring "Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019". To check if this is the issue, can you do
For background, since 2.1 the default binary is the GPU-enabled one; the CPU-only one can be installed separately. Then when you test, please make sure you're in the right environment ( |
Tnx for reply & suggestions which I understand quite well. However, since I did so many experiments (as I would rather call them by now), I had already removed Tensorflow 2.1.0 in the meantime. So the problems observed apparently have nothing to do with either 2.1.0 nor 2.0.0. And rightly so: after installing tensorflow-cpu as indicated above, an error message like the last one appeared again. So essentially, nothing has changed, I have tensorflow 2.1.0 again in my At the moment I suspect my problems have to do with the path leading to tensorflow. I found an issue dealing with that, where quite similar problems like mine disappeard after doing the tensorflow-installation with
but: how do I find the [path] when even the programme itself doesn't find it? Simply doing PS: Oh, yes - and the "Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019" I have already installed, too, in the meantime. |
I do not follow ... You removed 2.1 yet pip says you have it? At this point, I can only suggest the same as above
Alternatively:
We first need to get it working from Python, and then see about R. |
Yes, as I said: After our attempts from 4 days ago with tensorflow 2.1.0 I deinstalled that, then repeated the process with 2.0.0, a second time with 2.1.0 and a second time with 2.0.0. And from this last attempt obviously remained one tensorflow 2.1.0, together with the last installation of tensorflow 2.0.0, see pip list from just a few mins after I received your last post: Since there was an apparently already complete set of tensorflow 2.0.0 I decided to follow your alternative, uninstalled with Apparently, something went wrong with this "partial" uninstall/install actions or so, don't know. I therefore uninstalled tensorflow 2.0.0 (i.e. definitely both versions were then absent), and finally did From within RStudio nothing has changed either, as the command sequence
again gives
|
In the meantime I changed from R3.6.1 (when installing R-packages, I got several warnings that they have been built under R3.6.2) to R3.6.2 and from Anaconda3 to Miniconda3 - to no avail: Not only did I get the same message from Against much earlier attemps the situation has changed insofar, as I now keep getting identical error messages consistently (i.e. since about 10 days intensive trials). This indicates, that there must be a rather basic problem, common to all the undertaken attempts, behind this installation problem. As I have not the slightest idea what that could be, I'm asking desperately for help. |
I don't like saying this, but given that your issue looks so similar to the ones I linked in my comment above (and I think when you say, you get one error message again and again, it's the DLL not found one, right?), while these two issues were closed in TF either with downgrade to 2.0 or installing that Visual Studio thing ... I think it makes most sense for you to create an issue in the TF repo directly. They might have an idea which DLL is not found, or how to find out... Sorry for not having better advice in this situation... If you create that issue in TF, please link it here so we can follow. |
Tnx. The issue was forwarded to Tensorflow 2.0.0 cpu, import error: DLL load failed #36138. |
Ok, let's hope for the best :-) |
BTW you may want to edit the issue and remove anything R/RStudio-related, as it is not relevant and could only be distracting :-) |
I thought so too, but looking at the actual install guides makes me nervous: if the so called 'simple' and 'quick' installation via RStudio should really not be possible (it looks as if nobody seems to be interested in that any more), I would have to forget my running ML projects for which I have worked the past 3 years for quite a long time. To learn Python and the handling of several auxiliary 'environments' etc. just for being able to bring tensorflow back to life on my computer is no fun for people like me who are interested in applications and not in IT itself... |
I should have been more clear - what But if an error occurs that is directly attributable to the TF installation per se (not to R not managing to find it, say), all that is needed to diagnose is information about the Python installation. Even if the problem has nothing to do with R, we always try to help. But in some cases, like yours, it may make sense to file an issue in the original repository. Especially since your issue is so similar to ones that were closed with solutions none of which worked for you. (BTW, added a comment to your issue in that respect.) |
In connection with the new version of reticulate v1.14 and after quite a few problems to get Keras available, I encountered a rather serious problem. In an existing program written under
keras v2.2.0.9000
,reticulate v1.10
andtensorflow v1.9
and since then run successfully many times, the commandnow run under
reticulate 1.14
,tensorflow 2.0.0
andkeras 2.2.5.0
, produce the following error message:Similarly, the command
produces the error message
So - which method would then be applicable for compilation? Consulting the
keras 2.2.5.0
index w.r.t. commandcompile
shows thatcompile
as such doesn't exist as entry in the index any more, but onlyHowever, under this symbolic headline I find the same description as earlier under keyword
compile(...)
and I cannnot detect anything wrong within the command used as above. Correspondingly the situation forfit()
.Moreover, the function
to_categorical(y, num_classes = NULL, ...)
now seems to require specification ofnum_classes
explicitely, since without this specification (as it was used up to now), a mysterious error messageappears. And, really, the command
tensorflow::tf_config()
shows, much to my surprise,Note that in my case actually
tensorflow v2.0.0
has been installed; the recommended command to installtensorflow v1.9
(sic!) at this point sounds like a dire reminiscence to my (lost) previous era with Keras. And there is no way back: an attempt to reinstalltensorflow 1.9
automatically leads to reinstallation oftensorflow 2.0.0
, sincetensorflow 1.9
is not available forR 3.6.2
. Catch 362, so to speak...I am really at a loss how to proceed. Any useful hint would be highly appreciated.
Tnx in advance,
Leo Faltin
The text was updated successfully, but these errors were encountered: