无法创建Python=3.4版本的Anaconda环境求助
Hey there! As someone new to Anaconda and Python, it's totally normal to hit snags with older Python versions—let's walk through fixing your issues step by step.
First Error: PackagesNotFoundError: version=3.4
Your first command had a simple syntax mistake. When specifying the Python version for a new conda environment, you need to use python=3.4 instead of version=3.4. The version parameter isn't a valid package spec here—conda thought you were trying to install a package named version with version 3.4, which doesn't exist.
The corrected command should have been:
conda create -n py34 python=3.4
Second Error: UnsatisfiableError (VC/Pip/VS2010 Runtime Conflicts)
When you fixed the syntax and added -c conda-forge, you ran into dependency conflicts. Here's why this happens:
- Python 3.4 is an end-of-life (EOL) version (it stopped receiving updates in 2019). Modern conda versions and current package channels no longer maintain compatible packages for it, especially on Windows.
- Python 3.4 requires Visual Studio 2010 runtime (
vc=10andvs2010_runtime), but newer conda packages rely on newer VC versions (like vc=14). These old runtime packages are no longer hosted in active channels, so conda can't resolve the dependencies.
Solutions to Fix This
Since Python 3.4 is so old, we need to use workarounds tailored to legacy versions:
Option 1: Install a Legacy Miniconda Version (Simplest Approach)
The easiest way to get a working Python 3.4 environment is to install a Miniconda version that ships with Python 3.4 out of the box. Look for Miniconda3-4.3.30-Windows-x86_64.exe (this is the last Miniconda release that includes Python 3.4). Once installed, you'll have a ready-to-use Python 3.4 environment without needing to create one manually.
Option 2: Force Conda to Use Legacy Package Sources (Advanced)
If you want to use your existing Anaconda installation, try creating the environment with explicit constraints and forcing conda to use older package repositories. Run this command:
conda create -n py34 python=3.4=*vc10* pip=9.0.1 vs2010_runtime=10.0.40219.1 --override-channels -c defaults -c free
python=3.4=*vc10*ensures we grab the Python 3.4 build that uses VC10pip=9.0.1is the last pip version compatible with Python 3.4--override-channelsand-c defaults -c freerestrict conda to channels that still host legacy packages
If this still fails, you may need to downgrade your conda version first to one that supports Python 3.4. Run this command to downgrade conda:
conda install conda=4.6.14
Then try creating the environment again with the corrected python=3.4 command.
Final Notes
Keep in mind that Python 3.4 is no longer supported, so you'll run into issues with most modern libraries. If possible, consider upgrading to a newer supported Python version (like 3.8 or later) for better compatibility and security. But if you absolutely need Python 3.4 for a specific project, the above steps should get you up and running.
内容的提问来源于stack exchange,提问作者mehe




