none
Can not import tensorflow from Jupyter Notebook or Anaconda Prompt but I can import it from environments recognized by Visual Studio RRS feed

  • Question

  • My laptop runs Windows 10 and have installed Anaconda3.

    I have recently installed tensorflow-gpu and the Visual Studio 2017

    I can import tensorflow using the interactive anaconda command prompt in the Anaconda environment from within Visual Studio 2017.

    I can not import tensorflow from the commander window invoked through Anaconda Prompt.

    For your better information the error message is the following:

    >>> import tensorflow
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
        from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\tensorflow\python\__init__.py", line 63, in <module>
        from tensorflow.python.framework.framework_lib import *  # pylint: disable=redefined-builtin
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\tensorflow\python\framework\framework_lib.py", line 104, in <module>
        from tensorflow.python.framework.importer import import_graph_def
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\tensorflow\python\framework\importer.py", line 32, in <module>
        from tensorflow.python.framework import function
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\tensorflow\python\framework\function.py", line 36, in <module>
        from tensorflow.python.ops import resource_variable_ops
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py", line 35, in <module>
        from tensorflow.python.ops import variables
      File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\tensorflow\python\ops\variables.py", line 40, in <module>
        class Variable(checkpointable.CheckpointableBase):
    AttributeError: module 'tensorflow.python.training.checkpointable' has no attribute 'CheckpointableBase'


    Your advice will be appreciated.
    Tuesday, April 2, 2019 5:53 PM

All replies

  • Hi Konst,

    Welcome to MSDN forum.

    Our forum is discussing Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. Your issue is related to Anaconda which is 3rd-party software. So we suggest that you open a new thread in stack overflow with anaconda tag. More community members on that forum may further look at your issue and provide more suggestions. Thank you for understanding.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, April 3, 2019 10:48 AM