Closed SamuelLarkin closed 3 years ago
For a certain reason it seems unset PYTHONPATH env var, prior to activating the conda environment, does the required work to make this pip install under conda succeed. I was able to replicate the original issue, having the command (pip install mxnet-cu101mkl
fail when it searches the compute canada PYTHONPATH site-packages first.
[fieldsa@cn101 ~]$ module load cuda/10.1 cudnn anaconda
Anaconda3-2020.11: Please don't forget to type: . activate
Due to MODULEPATH changes, the following have been reloaded:
1) openmpi/3.1.2
[fieldsa@cn101 ~]$ echo $PYTHONPATH
/cvmfs/soft.computecanada.ca/custom/python/site-packages
[fieldsa@cn101 ~]$ unset PYTHONPATH #<=====
[fieldsa@cn101 ~]$ conda create --name mlm-scoring-py38 python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.9.2
latest version: 4.10.1
Please update conda by running
$ conda update -n base conda
## Package Plan ##
environment location: /home/fieldsa/.conda/envs/mlm-scoring-py38
added / updated specs:
- python=3.8
The following NEW packages will be INSTALLED:
_libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
_openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-1_gnu
ca-certificates conda-forge/linux-64::ca-certificates-2020.12.5-ha878542_0
certifi conda-forge/linux-64::certifi-2020.12.5-py38h578d9bd_1
ld_impl_linux-64 conda-forge/linux-64::ld_impl_linux-64-2.35.1-hea4e1c9_2
libffi conda-forge/linux-64::libffi-3.3-h58526e2_2
libgcc-ng conda-forge/linux-64::libgcc-ng-9.3.0-h2828fa1_19
libgomp conda-forge/linux-64::libgomp-9.3.0-h2828fa1_19
libstdcxx-ng conda-forge/linux-64::libstdcxx-ng-9.3.0-h6de172a_19
ncurses conda-forge/linux-64::ncurses-6.2-h58526e2_4
openssl conda-forge/linux-64::openssl-1.1.1k-h7f98852_0
pip conda-forge/noarch::pip-21.1.1-pyhd8ed1ab_0
python conda-forge/linux-64::python-3.8.10-h49503c6_1_cpython
python_abi conda-forge/linux-64::python_abi-3.8-1_cp38
readline conda-forge/linux-64::readline-8.1-h46c0cb4_0
setuptools conda-forge/linux-64::setuptools-49.6.0-py38h578d9bd_3
sqlite conda-forge/linux-64::sqlite-3.35.5-h74cdb3f_0
tk conda-forge/linux-64::tk-8.6.10-h21135ba_1
wheel conda-forge/noarch::wheel-0.36.2-pyhd3deb0d_0
xz conda-forge/linux-64::xz-5.2.5-h516909a_1
zlib conda-forge/linux-64::zlib-1.2.11-h516909a_1010
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate mlm-scoring-py38
#
# To deactivate an active environment, use
#
# $ conda deactivate
[fieldsa@cn101 ~]$ conda activate mlm-scoring-py38
(mlm-scoring-py38) [fieldsa@cn101 ~]$ pip install mxnet-cu101mkl
Looking in links: /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/nix/avx512, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/nix/avx2, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/nix/generic, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic
Collecting mxnet-cu101mkl
Using cached mxnet_cu101mkl-1.6.0.post0-py2.py3-none-manylinux1_x86_64.whl (712.3 MB)
Collecting requests<3,>=2.20.0
Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting graphviz<0.9.0,>=0.8.1
Using cached graphviz-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting numpy<2.0.0,>1.16.0
Downloading numpy-1.20.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB)
|████████████████████████████████| 15.4 MB 4.6 MB/s
Collecting idna<3,>=2.5
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
Collecting chardet<5,>=3.0.2
Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Requirement already satisfied: certifi>=2017.4.17 in ./.conda/envs/mlm-scoring-py38/lib/python3.8/site-packages (from requests<3,>=2.20.0->mxnet-cu101mkl) (2020.12.5)
Installing collected packages: urllib3, idna, chardet, requests, numpy, graphviz, mxnet-cu101mkl
Successfully installed chardet-4.0.0 graphviz-0.8.4 idna-2.10 mxnet-cu101mkl-1.6.0.post0 numpy-1.20.3 requests-2.25.1 urllib3-1.26.4
(mlm-scoring-py38) [fieldsa@cn101 ~]$ conda list
# packages in environment at /home/fieldsa/.conda/envs/mlm-scoring-py38:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
ca-certificates 2020.12.5 ha878542_0 conda-forge
certifi 2020.12.5 py38h578d9bd_1 conda-forge
chardet 4.0.0 pypi_0 pypi
idna 2.10 pypi_0 pypi
ld_impl_linux-64 2.35.1 hea4e1c9_2 conda-forge
libffi 3.3 h58526e2_2 conda-forge
libgcc-ng 9.3.0 h2828fa1_19 conda-forge
libgomp 9.3.0 h2828fa1_19 conda-forge
libstdcxx-ng 9.3.0 h6de172a_19 conda-forge
mxnet-cu101mkl 1.6.0.post0 pypi_0 pypi
ncurses 6.2 h58526e2_4 conda-forge
numpy 1.20.3 pypi_0 pypi
openssl 1.1.1k h7f98852_0 conda-forge
pip 21.1.1 pyhd8ed1ab_0 conda-forge
python 3.8.10 h49503c6_1_cpython conda-forge
python-graphviz 0.8.4 pypi_0 pypi
python_abi 3.8 1_cp38 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
requests 2.25.1 pypi_0 pypi
setuptools 49.6.0 py38h578d9bd_3 conda-forge
sqlite 3.35.5 h74cdb3f_0 conda-forge
tk 8.6.10 h21135ba_1 conda-forge
urllib3 1.26.4 pypi_0 pypi
wheel 0.36.2 pyhd3deb0d_0 conda-forge
xz 5.2.5 h516909a_1 conda-forge
zlib 1.2.11 h516909a_1010 conda-forge
(mlm-scoring-py38) [fieldsa@cn101 ~]$
So the question is why does conda restrict itself to PYTHONPATH to find the package and why it doesn't go on the web to fetch it?
Good question. This question may be best answered by anaconda project. I don't have a ready answer to explain the behavior of the environment settings in this case, except that they are inherited from conda or it's default configuration.
Hi, I'm trying to create a
conda
environment for Masked Language Model Scoring which requires to havepytorch
andmxnet-cu101mkl
as documented (pip install torch mxnet-cu101mkl
)Here's the command I'm running:
But when I run
pip install mxnet-cu101mkl
, I get the following error message most likely due to the fact that there is a mismatch between CentOS and the available mxnet.Even if I try to specify a version, it fails.
Why can't I install mxnet anymore?
I used to be able to install mxnet as I have a
conda
environment namedsockeye-1.18.115_cu101
which containsmxnet-cu101mkl==1.6.0
. Here's the output ofconda env export --name sockeye-1.18.115_cu101
: