rsnt_translations
56,430
edits
No edit summary |
No edit summary |
||
Line 133: | Line 133: | ||
<!--T:30--> | <!--T:30--> | ||
To see where the < | To see where the <code>pip</code> command is installing a python package from, diagnosing installation issues, you can tell it to be more verbose with the <code>-vvv</code> option. It also worth mentioning that when installing multiple packages it is advisable to install them with one command as it helps pip resolve dependencies. | ||
==== Installing dependent packages ==== <!--T:35--> | ==== Installing dependent packages ==== <!--T:35--> | ||
<!--T:65--> | <!--T:65--> | ||
In some cases, such as TensorFlow, we provide wheels for a specific host (cpu or gpu), suffixed with < | In some cases, such as TensorFlow, we provide wheels for a specific host (cpu or gpu), suffixed with <code>_cpu</code> or <code>_gpu</code>. Packages dependent on <code>tensorflow</code> will then fail to install. | ||
If < | If <code>my_package</code> depend on <code>numpy</code> and <code>tensorflow</code>, then the following will allow us to install it: | ||
{{Commands|prompt=(ENV) [name@server ~] | {{Commands|prompt=(ENV) [name@server ~] | ||
|pip install numpy tensorflow_cpu --no-index | |pip install numpy tensorflow_cpu --no-index | ||
|pip install my_package --no-deps | |pip install my_package --no-deps | ||
}} | }} | ||
The < | The <code>--no-deps</code> options tells <code>pip</code> to ignore dependencies. | ||
=== Creating virtual environments inside of your jobs === <!--T:36--> | === Creating virtual environments inside of your jobs === <!--T:36--> |