Cannot install mkl with pip

I want to build pytorch from the source on the ubuntu machine. I am using aliyun. But whether I use pip or conda to install the packages required, I always encounter some problems.

  1. pip
    when I run
pip install mkl

the error is

Looking in indexes:
Collecting mkl
  Could not find a version that satisfies the requirement mkl (from versions: )
No matching distribution found for mkl

I also check, and download the file mkl-2018.0.3-py2.py3-none-manylinux1_x86_64.whl. Then I

pip install mkl-2018.0.3-py2.py3-none-manylinux1_x86_64.whl

And I got an error

mkl-2018.0.3-py2.py3-none-manylinux1_x86_64.whl is not a supported wheel on this platform.


  1. conda
➜  ~ conda install -c mingfeima mkldnn
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - mkldnn

Current channels:


To search for alternate channels that may provide the conda package you're
looking for, navigate to

and use the search bar at the top of the page.

Has anyone encountered this problem?

hi, i didn’t try to build on aliyun before. But the normal build process is listed on

i suggest you use conda to install all the dependencies as CMAKE_PREFIX_PATH refers to /home/user/anaconda3. if you use pip at the first place, the libs will installed under system python instead of conda python.

if you still have trouble installing with conda, it might be a aliyun support issue.
mkldnn is only needed if you want to run cpu instances, in case mkldnn is installed in conda, it will be enabled during the build by default.

Hi, Please check if you’re using a 32bit OS? If it is, please try to run it on a 64bit OS. All the binaries that we’ve hosted on either Anaconda Cloud or PyPI are built for 64b OSes.Thanks

hi, @mingfeima, thanks for the help. I’m so sorry that I was too busy recently that I didn’t check your response.

I followed the steps on the github page to use conda. And yes, I only want to run cpu instances. Maybe it’s a aliyun support issue. The machine I use is a 32bit OS. I will try 64bit OS to see if it works.


hi, @jason_ye, thanks for the response. I’m so sorry that I was too busy recently that I didn’t check your response.

The machine I use is a 32bit OS. Maybe It’s the problem. I’ll try a 64bit OS to see whether it works.


@liuzhishan, OK, waiting for your test result. Thanks.