问题描述
我将 docker 与 python 一起使用,当我需要安装某些特定版本的应用程序时,我仍然使用 docker:
=> ERROR [3/3] RUN pip install cx-Oracle == 7.0.0 pandas == 1.1.2
我在 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"]
解决方法
这与docker无关。 """
Plotting _____________________________________________________________________________________________________________
"""
fig = plt.figure(figsize=(20,15))
host1 = host_subplot(211,axes_class=AA.Axes)
plt.subplots_adjust(right=0.75)
#Create custom axes
cax1 = plt.axes(frameon=False)
# Now create parasite axis
par11 = host1.twiny()
par12 = host1.twiny()
top_offset = 50
new_fixed_axis1 = par12.get_grid_helper().new_fixed_axis
par12.axis["top"] = new_fixed_axis1(loc="top",axes=par11,offset=(0,top_offset))
par11.axis["top"].toggle(all=True)
par12.axis["top"].toggle(all=True)
# Bottom Axis
bottom_offset1 = -50
bottom_offset2 = -100
par21 = host1.twiny()
par22 = host1.twiny()
new_fixed_axis2 = par21.get_grid_helper().new_fixed_axis
par21.axis["bottom"] = new_fixed_axis2(loc="bottom",axes=par12,bottom_offset1))
# Set Host Axis Labels
host1.set_xlabel("UTC Time")
host1.set_ylabel("Elevation (km")
# Set Top Axis Labels
par11.set_xlabel("Sonde Potential Temperature (K)")
par12.set_xlabel("Sonde Relative Humidity %")
vmin,vmax = np.min(chan_1064),np.max(chan_1064)
im = host1.imshow(chan_1064,aspect="auto",cmap=get_a_color_map(),vmin=-2e-4,vmax=0.6e-2,extent=(min(xs),max(xs),min(bin_alt_array),max(bin_alt_array)))
scatter = host1.scatter(xs,ys,s=100,color='gold')
host1.set_xlim(min(xs),max(xs))
fig.colorbar(im)
plt.draw()
leg = plt.legend( loc = 'lower right')
# Adjust Fonts
font = {'family' : 'normal','weight' : 'bold','size' : 12}
mpl.rc('font',**font)
plt.tight_layout()
plt.show()
只是不喜欢包名和版本之间的空格。
如果您直接在终端中尝试 pip install
,您将在 pip install nonexistingpackage == 1.0.0
之前甚至检查包 Invalid requirement: '=='
是否存在之前收到错误 pip
。
原因是 nonexistingpackage
使用空格作为不同包之间的分隔符。
去除空格:
pip install