0

I'm using docker with python,when I need install some specific version of apps I docker remains me:

 => ERROR [3/3] RUN pip install cx-Oracle == 7.0.0 pandas == 1.1.2    

my code in Dockerfile:

# Dockerfile, Image, Container

From python:3.7.9

ADD main.py .

Run pip install cx-Oracle == 7.0.0 pandas == 1.1.2

CMD ["python","./main.py"]
William
  • 3,724
  • 9
  • 43
  • 76

1 Answers1

0

This has nothing to do with docker. pip install just does not like spaces between package name and version.

If you try pip install nonexistingpackage == 1.0.0 directly in the terminal you will get the error Invalid requirement: '==', before pip even checking if the package nonexistingpackage exists.

The reason is that pip install is using the whitespace as the delimiter between the different packages.

Remove the whitespaces:

RUN pip install cx-Oracle==7.0.0 pandas==1.1.2
DeepSpace
  • 78,697
  • 11
  • 109
  • 154