Skip to content

Commit b071a0e

Browse files
Merge pull request #233213 from lykelly19/patch-5
Update with new failure scenarios (pip no matching distribution, pip invalid operator, term not recognized, missing command, command not found)
2 parents 91b4b52 + 29f8a72 commit b071a0e

File tree

1 file changed

+93
-1
lines changed

1 file changed

+93
-1
lines changed

articles/machine-learning/how-to-troubleshoot-environments.md

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ Ensure that you've spelled all listed packages correctly and that you've pinned
13511351

13521352
### Missing command
13531353
<!--issueDescription-->
1354-
This issue can happen when a command isn't recognized during an image build.
1354+
This issue can happen when a command isn't recognized during an image build or in the specified Python package requirement.
13551355

13561356
**Potential causes:**
13571357
* You didn't spell the command correctly
@@ -1738,6 +1738,48 @@ pip install --ignore-installed [package]
17381738
17391739
Try creating a separate environment using conda
17401740
1741+
### Invalid operator
1742+
<!--issueDescription-->
1743+
This issue can happen when pip fails to install a Python package due to an invalid operator found in the requirement.
1744+
1745+
**Potential causes:**
1746+
* There's an invalid operator found in the Python package requirement
1747+
1748+
**Affected areas (symptoms):**
1749+
* Failure in building environments from UI, SDK, and CLI.
1750+
* Failure in running jobs because Azure Machine Learning implicitly builds the environment in the first step.
1751+
<!--/issueDescription-->
1752+
1753+
**Troubleshooting steps**
1754+
* Ensure that you've spelled the package correctly and that the specified version exists
1755+
* Ensure that your package version specifier is formatted correctly and that you're using valid comparison operators. See [Version specifiers](https://peps.python.org/pep-0440/#version-specifiers)
1756+
* Replace the invalid operator with the operator recommended in the error message
1757+
1758+
### No matching distribution
1759+
<!--issueDescription-->
1760+
This issue can happen when there's no package found that matches the version you specified.
1761+
1762+
**Potential causes:**
1763+
* You spelled the package name incorrectly
1764+
* The package and version can't be found on the channels or feeds that you specified
1765+
* The version you specified doesn't exist
1766+
1767+
**Affected areas (symptoms):**
1768+
* Failure in building environments from UI, SDK, and CLI.
1769+
* Failure in running jobs because Azure Machine Learning implicitly builds the environment in the first step.
1770+
<!--/issueDescription-->
1771+
1772+
**Troubleshooting steps**
1773+
* Ensure that you've spelled the package correctly and that it exists
1774+
* Ensure that the version you specified for the package exists
1775+
* Run `pip install --upgrade pip` and then run the original command again
1776+
* Ensure the pip you're using can install packages for the desired Python version. See [Should I use pip or pip3?](https://stackoverflow.com/questions/61664673/should-i-use-pip-or-pip3)
1777+
1778+
**Resources**
1779+
* [Running Pip](https://pip.pypa.io/en/stable/user_guide/#running-pip)
1780+
* [pypi](https://aka.ms/azureml/environment/pypi)
1781+
* [Installing Python Modules](https://docs.python.org/3/installing/index.html)
1782+
17411783
## *Make issues*
17421784
### No targets specified and no makefile found
17431785
<!--issueDescription-->
@@ -1787,6 +1829,34 @@ This issue can happen when Docker fails to find and copy a file.
17871829
* [Docker COPY](https://docs.docker.com/engine/reference/builder/#copy)
17881830
* [Docker Build Context](https://docs.docker.com/engine/context/working-with-contexts/)
17891831
1832+
## *Apt-Get Issues*
1833+
### Failed to run apt-get command
1834+
<!--issueDescription-->
1835+
This issue can happen when apt-get fails to run.
1836+
1837+
**Potential causes:**
1838+
* Network connection issue, which could be temporary
1839+
* Broken dependencies related to the package you're running apt-get on
1840+
* You don't have the correct permissions to use the apt-get command
1841+
1842+
**Affected areas (symptoms):**
1843+
* Failure in building environments from UI, SDK, and CLI.
1844+
* Failure in running jobs because it will implicitly build the environment in the first step.
1845+
<!--/issueDescription-->
1846+
1847+
**Troubleshooting steps**
1848+
* Check your network connection and DNS settings
1849+
* Run `apt-get check` to check for broken dependencies
1850+
* Run `apt-get update` and then run your original command again
1851+
* Run the command with the `-f` flag, which will try to resolve the issue coming from the broken dependencies
1852+
* Run the command with `sudo` permissions, such as `sudo apt-get install <package-name>`
1853+
1854+
**Resources**
1855+
* [Package management with APT](https://help.ubuntu.com/community/AptGet/Howto)
1856+
* [Ubuntu Apt-Get](https://manpages.ubuntu.com/manpages/xenial/man8/apt-get.8.html)
1857+
* [What to do when apt-get fails](https://www.linux.com/news/what-do-when-apt-get-fails/#:~:text=Check%20the%20broken%20dependencies%E2%80%99%20availability.%20Run%20apt-get%20update,adding%20another%20source%2C%20then%20run%20apt-get%20install%20again)
1858+
* [apt-get command in Linux with Examples](https://www.geeksforgeeks.org/apt-get-command-in-linux-with-examples/)
1859+
17901860
## *Docker push issues*
17911861
### Failed to store Docker image
17921862
<!--issueDescription-->
@@ -1838,6 +1908,28 @@ This issue can happen when Docker doesn't recognize an instruction in the Docker
18381908
**Resources**
18391909
* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/)
18401910
1911+
## *Command Not Found*
1912+
### Command not recognized
1913+
<!--issueDescription-->
1914+
This issue can happen when the command being run isn't recognized.
1915+
1916+
**Potential causes:**
1917+
* You haven't installed the command via your Dockerfile before you try to execute the command
1918+
* You haven't included the command in your path, or you haven't added it to your path
1919+
1920+
**Affected areas (symptoms):**
1921+
* Failure in building environments from UI, SDK, and CLI.
1922+
* Failure in running jobs because it will implicitly build the environment in the first step.
1923+
<!--/issueDescription-->
1924+
1925+
**Troubleshooting steps**
1926+
Ensure that you have an installation step for the command in your Dockerfile before trying to execute the command
1927+
* Review this [example](https://stackoverflow.com/questions/67186341/make-install-in-dockerfile)
1928+
1929+
If you've tried installing the command and are experiencing this issue, ensure that you've added the command to your path
1930+
* Review this [example](https://stackoverflow.com/questions/27093612/in-a-dockerfile-how-to-update-path-environment-variable)
1931+
* Review how to set [environment variables in a Dockerfile](https://docs.docker.com/engine/reference/builder/#env)
1932+
18411933
## *Miscellaneous build issues*
18421934
### Build log unavailable
18431935
<!--issueDescription-->

0 commit comments

Comments
 (0)