TensorFlow安装失败:执行pip3命令提示未识别错误求助
Hey there! Let’s work through this pip3 not recognized error—since you already have Python 3.6 and Anaconda 3 set up, we just need to adjust how you’re calling the package manager or fix your system’s path configuration. Here are a few reliable solutions:
Solution 1: Use Conda (Anaconda’s built-in package manager, recommended)
Anaconda environments are designed to avoid path conflicts, so using conda is usually the smoothest route. Here’s what to do:
- Open the Anaconda Prompt (not a regular Command Prompt—it automatically loads all Anaconda’s path settings).
- (Optional but best practice) Create an isolated environment for TensorFlow to keep your base setup clean:
conda create -n tf_env python=3.6 - Activate the new environment:
conda activate tf_env - Install TensorFlow. Since you’re using an AMD GPU on Windows, you’ll want the CPU version (ROCm support for AMD GPUs is primarily for Linux right now):
If you still prefer using pip within the conda environment, you can runconda install tensorflowpip install --upgrade tensorflowhere—no need forpip3, since the environment’s pip is tied directly to your Python 3.6.
Solution 2: Fix your system’s PATH to recognize pip3
If you want to use pip3 directly, the issue is that Windows can’t find the pip3.exe executable in its system PATH. Here’s how to fix that:
- Locate the
Scriptsfolder for your Python 3.6 installation. If you used Anaconda, this is typically:- For the base Anaconda environment:
C:\Users\[YourUsername]\anaconda3\Scripts - For a custom conda environment:
C:\Users\[YourUsername]\anaconda3\envs\[your_env_name]\Scripts
- For the base Anaconda environment:
- Open Windows Settings > System > About > Advanced system settings > Environment Variables.
- Under "System Variables", find the
Pathvariable, click Edit. - Add the full path to the
Scriptsfolder you found earlier to the list of paths. - Click OK to save all changes, then close and reopen your command prompt (this ensures the updated PATH takes effect).
- You should now be able to run
pip3 install --upgrade tensorflowwithout errors.
Solution 3: Use python -m pip as a workaround
If you don’t want to mess with PATH settings, you can call pip directly through your Python interpreter. This bypasses any PATH issues because it uses the pip version linked directly to your installed Python 3.6:
python -m pip install --upgrade tensorflow
内容的提问来源于stack exchange,提问作者TheEkhoedOne

