30262

Got CondaVerificationError when installing Tensorflow

<h3>Question</h3>

I got a CondaVerificationError when installing Tensorflow on my 64-bit Win10.

CondaVerificationError: The package for tensorflow-estimator located at C:\Users\viviennejia.zhong\AppData\Local\Continuum\anaconda3\pkgs\tensorflow-estimator-1.13.0-py37h39e3cac_0 appears to be corrupted. The path 'Lib/site-packages/tensorflow_estimator/python/estimator/canned/linear_optimizer/python/utils/__pycache__/sharded_mutable_dense_hashtable.cpython-37.pyc' specified in the package manifest cannot be found. ClobberError: This transaction has incompatible packages due to a shared path. packages: conda-forge::tensorboard-1.13.1-py37_0, conda-forge::tensorflow-base-1.13.1-py37_7 path: 'scripts/tensorboard-script.py' ClobberError: This transaction has incompatible packages due to a shared path. packages: conda-forge::tensorboard-1.13.1-py37_0, conda-forge::tensorflow-base-1.13.1-py37_7 path: 'scripts/tensorboard.exe'

In some posts I saw conda clean --all could help. Runing this, I got

FileNotFoundError: [WinError 3] 'C:\\Users\\xxxx\\AppData\\Local\\Continuum\\anaconda3\\pkgs\\tensorflow-base-2.0.0-mkl_py37hd1d5974_0\\Lib\\site-packages\\tensorflow-2.0.0.data\\purelib\\tensorflow_core\\include\\tensorflow_core\\core\\common_runtime\\isolate_placer_inspection_required_ops_pass.h'

I am new to conda and appreciate very much your help to solve this issue.


<h3>Answer1:</h3>

Providing the solution here (Answer Section), even though it is present in the Comment Section, for the benefit of the community.

Installation of Tensorflow through pip has resolved issue

pip install tensorflow (install latest version)

or

pip install tensorflow==2.0 (for older version)

In addition to above method, there is a recommended way is to create a Virtual Environment in Anaconda and install the Tensorflow in that Virtual Environment, which works in most of the cases.

Using Virtual Environments has advantages like

<ul><li>We can maintain multiple versions of Tensorflow in multiple Virtual Environments with each Virtual Environment comprising each version like 1.14, 1.15, 2.0, 2.1, 2.2,etc..</li> <li>We can use different Python Versions (2.x, 3.6, 3.7) in each Virtual Environment</li> <li>If we want to modify the source code of any of the Tensorflow API, we can do it within our Virtual Environment, without impacting its functionality in other Virtual Environments.</li> </ul>

Steps for Creating a New Virtual Environment and installing Tensorflow in Anaconda, for different Operating Systems, is shown below:

# Create a New Virtual Environment conda create --name TF_2_VE # When conda asks you to proceed, type y: proceed ([y]/n)? # Activate the Virtual Environment. Conda Version > 4.6 conda activate TF_2_VE # Activating Virtual Environment, Conda Version < 4.6 and Windows OS activate TF_2_VE # Activating Virtual Environment, Conda Version < 4.6 and Linux and Mac OS source activate TF_2_VE # Install the TF Version you need conda install tensorflow

The above command will install the Latest Version of Tensorflow (2.2 as of now). If you want an older version like 2.0, you can replace the last step of the above set of commands with

conda install tensorflow==2.0.

来源:https://stackoverflow.com/questions/58918985/got-condaverificationerror-when-installing-tensorflow

Recommend

  • I want to get a JSON file from API and display it in the Interface using axios, but the problem is t
  • Java: how to read an input int
  • How can I include debug information with nasm?
  • How to avoid overlapping date ranges when using a grouping clause?
  • Submit form without reloading or leaving current page (php- mysql)
  • How to extend JavaScript console in WebView (to match ConsoleMessage.MessageLevel)
  • Codename One - container.setScrollVisible(true) in the center of a BorderLayout
  • SQL Server stored procedure runs fast in SSMS and slow in application [duplicate]
  • celery for different timezones
  • How to pre-filter showCommands in VSCode's quickOpen panel
  • PHP: Cookie in browser, but receive index undefined error
  • Inno Setup Calling DLL with string as parameter
  • Add business days without Saturday sunday and specific holidays in R
  • Pusher: How to bind to 100s of events?
  • Using REST to Login user to Windows Live
  • ZIndex on Clusters
  • WPF ContextMenu using ItemsControl, incorrectly highlight the whole collection
  • Loading data to neo4j from XML using py2neo
  • C99′s Fixed-Width Integer Types
  • Adding a custom email recipient depending on selected custom checkout field value
  • How to unpickle from C code
  • Preventing Internet-accessing-method from delaying a toast popup
  • Is there a function to calculate the difference between two times and display a relative result?
  • Isabelle matrix arithmetic: det_linear_row_setsum in library with different notation
  • Repeatable job for Laravel json api
  • what is “Other” category in CosmosDB monitoring graph?
  • Determine Active Panel
  • Get an image from the video
  • Working with codeception and laravel
  • WSO2 Identity Server + Rest STS Client (without ESB)
  • Bulk loading into PostgreSQL from a remote client
  • E: Malformed entry 1 in list file /etc/apt/sources.list.d/sbt.list (Suite)
  • How to add ng-app after page load?
  • integrity constraint violation: NOT NULL check constraint
  • Splitting ReportLab table across PDF page (side by side)?