Reputation: 23
When I desire to install tensorflow by use the command "pip3 install --upgrade tensorflow", then an error occurred :
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\tensorflow_estimator\\python\\estimator\\canned\\linear_optimizer\\python\\utils\\__pycache__\\sharded_mutable_dense_hashtable.cpython-37.pyc'
How to solve this problem? please!
Upvotes: 0
Views: 773
Reputation: 144
System requirements
pip 19.0 or later (requires many Linux 2010 support) Ubuntu 16.04 or later (64-bit) mac OS 10.12.6 (Sierra) or later (64-bit) (no GPU support) Windows 7 or later (64-bit) (Python 3 only) Raspbian 9.0 or later
Hardware requirements
Starting with Tensor Flow 1.6, binaries use AVX instructions which may not run on older CPU. Read the GPU support guide to set up a CUDA -enabled GPU card on Ubuntu or Windows.
Install the Python development environment on your system Requires Python > 3.4 and pip >= 19.0
python 3 --version pip3 --version virtualenv --version If these packages are already installed, skip to the next step. Otherwise, install Python, the pip package manager, and Virtualenv: sudo apt update sudo apt install python 3-dev python 3-pip sudo pip3 install -U virtualenv # system-wide install
Install packages within a virtual environment without affecting the host system setup. Start by upgrading pip: pip install --upgrade pip
Install the Tensor Flow pip package Choose one of the following Tensor Flow packages to install from PyPI:
tensor flow —Latest stable release (2.x) for CPU-only (recommended for beginners). tensor flow-GPU —Latest stable release with GPU support (Ubuntu and Windows). tf-nightly —Preview build (unstable). Ubuntu and Windows include GPU support. tensor flow==1.15 —The final version of Tensor Flow 1.x.
Package dependencies are automatically installed. These are listed in the setup.py file under REQUIRED_PACKAGES.
pip install --upgrade tensor flow
Upvotes: 0
Reputation: 144
I read your question and i want to answer your question is my answer solve your question then i will be really happy with that.
Basically this is an environment issue so that's why i give you some information when you installing your tensor flow environment in your system.
System requirements
pip 19.0 or later (requires many Linux 2010 support) Ubuntu 16.04 or later (64-bit) mac OS 10.12.6 (Sierra) or later (64-bit) (no GPU support) Windows 7 or later (64-bit) (Python 3 only) Raspbian 9.0 or later
Hardware requirements
Starting with Tensor Flow 1.6, binaries use AVX instructions which may not run on older CPU. Read the GPU support guide to set up a CUDA -enabled GPU card on Ubuntu or Windows.
Install the Python development environment on your system Requires Python > 3.4 and pip >= 19.0
Caution: Upgrading the system pip can cause problems If not in a virtual environment, use python 3 -m pip for the commands below. This ensures that you upgrade and use the Python pip instead of the system pip.
Create a virtual environment (recommended) Python virtual environments are used to isolate package installation from the system.
Create a new virtual environment by choosing a Python interpreter and making a ./venv directory to hold it:
virtualenv --system-site-packages -p python 3 ./venv Activate the virtual environment using a shell-specific command: source ./venv/bin/activate # sh, bash, ksh, or zsh When virtualenv is active, your shell prompt is prefixed with (venv).
Install packages within a virtual environment without affecting the host system setup. Start by upgrading pip: pip install --upgrade pip
pip list # show packages installed within the virtual environment
And to exit virtualenv later: deactivate # don't exit until you're done using Tensor Flow
Install the Tensor Flow pip package Choose one of the following Tensor Flow packages to install from PyPI:
tensor flow —Latest stable release (2.x) for CPU-only (recommended for beginners). tensor flow-GPU —Latest stable release with GPU support (Ubuntu and Windows). tf-nightly —Preview build (unstable). Ubuntu and Windows include GPU support. tensor flow==1.15 —The final version of Tensor Flow 1.x.
Package dependencies are automatically installed. These are listed in the setup.py file under REQUIRED_PACKAGES.
pip install --upgrade tensor flow
Upvotes: 1