Anaconda *.yml文件技术疑问:Python版本及依赖格式解析
Understanding Your Anaconda YAML Configuration
Let's tackle your two questions one by one to clear up the confusion around this .yml file.
1. What does jupyter=1.0.0=py36_3 mean?
You're right that jupyter=1.0.0 refers to the Jupyter package at version 1.0.0. The trailing =py36_3 is Conda's build identifier, which carries key details about how the package was compiled:
py36: This indicates the package was built specifically for Python 3.6 (thepyprefix plus the major/minor Python version). This guarantees compatibility with the Python version in your environment._3: This is the build number. If a package is rebuilt multiple times (to fix build bugs, add dependencies, or update compiler settings, for example), this number increments. It helps tell apart different builds of the exact same package version.
In short: this is the 3rd build of Jupyter 1.0.0, compiled to work with Python 3.6.
2. Are there two different Python versions referenced?
Nope, there's only one Python version in this environment! Let's break it down:
- The line
python=3.6.2=0underdependenciesdefines the base Python interpreter for your entire Conda environment (AdvML). Every package in this environment will run on this Python 3.6.2 installation. - The
pipsection lists packages that are installed via pip instead of Conda. The linetensorflow==1.3.0is just specifying the version of TensorFlow to install via pip—it has nothing to do with Python versions. This TensorFlow package will run perfectly on the Python 3.6.2 interpreter defined in your environment.
The confusion likely comes from mixing up TensorFlow's version (1.3.0) with Python's version. There's no second Python here—just a pip-installed package that's compatible with your environment's Python 3.6.2.
内容的提问来源于stack exchange,提问作者user49404
相关产品推荐
相关产品推荐

