AnimeGAN icon indicating copy to clipboard operation
AnimeGAN copied to clipboard

ImportError: cannot import name 'trace'

Open Chauban opened this issue 3 years ago • 8 comments

I use the whole new conda environment, but when run the example video transfer command, error occurs:

    from tensorflow_estimator.python.estimator import estimator
  File "C:\Users\XU\.conda\envs\anime\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 36, in <module>
    from tensorflow.python.profiler import trace
ImportError: cannot import name 'trace'

(anime) E:\AI_art\AnimeGANv2-master>

How to solve it please? Thanks

Chauban avatar Jan 19 '22 12:01 Chauban

Do you know how to slove it?Thanks

2076263413 avatar Jan 29 '22 12:01 2076263413

That should be the wrong version of your installation package.

TachibanaYoshino avatar Jan 29 '22 15:01 TachibanaYoshino

oh,what version of package do you use?Thanks. 图片

2076263413 avatar Jan 30 '22 03:01 2076263413

Thank you for your help!

2076263413 avatar Jan 30 '22 03:01 2076263413

Thank you for your help!

Yes, I have same version of yours. I have not addressed yet

Chauban avatar Jan 30 '22 13:01 Chauban

That should be the wrong version of your installation package.

I use the same version as the page said*-*

Chauban avatar Jan 30 '22 13:01 Chauban

Hi , I was using Anaconda and seems it installed the wrong version of tensorflow-estimator for tensorflow 1.15 https://github.com/spyder-ide/spyder/issues/17783#issuecomment-1112562820 This solved it @Chauban

Bazifrasool avatar Jul 15 '23 18:07 Bazifrasool

Hi there, I was struggling with different old repo, and trying to make it work. I get the same error, whole error message is :

from tensorflow.python.profiler import trace

2023-11-13 16:25:06.338656: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'trace' from 'tensorflow.python.profiler' (D:\Anaconda3_2022.10\envs\py37\lib\site-packages\tensorflow_core\python\profiler\__init__.py)

When I check it, there is no trace.py file on that folder. I am using Anaconda Prompt / Spyder with Python 3.7.16 I am using tensorflow 1.15.0. When I control the other library version some of them were different than I downgraded some of them to make it work, still the same problem. Am I missing something here or what?

Thanks.

MeraMeskul avatar Nov 13 '23 13:11 MeraMeskul