The option showscale for plotly.graph_objects.scatter3d.Line doesn't make a color scale appear, or seem to do anything. Here's an example:
import numpy as np
import plotly.graph_objs as go
x, y, z, c = np.random.random_sample((4, 10))
go.FigureWidget(data=[go.Scatter3d(
x=x,
y=y,
z=z,
mode="lines",
line=go.scatter3d.Line(
color=c,
showscale=True
)
)])

While, for the equivalent marker plot:
go.FigureWidget(data=[go.Scatter3d(
x=x,
y=y,
z=z,
mode="markers",
marker=go.scatter3d.Marker(
color=c,
showscale=True
)
)])

Just in case anyone else comes across this bug, here's the workaround I'm using:
Example workaround
import numpy as np
import plotly.graph_objs as go
def gen_color_bar(line_trace):
"""
Generates a trace which shows a colorbar based on a line plot.
Relevant issue: https://github.com/plotly/plotly.py/issues/1085
"""
return go.Scatter3d(
x=line_trace.x, y=line_trace.y, z=line_trace.z,
mode="markers",
marker=go.scatter3d.Marker(
color=line_trace.line.color,
colorscale=line_trace.line.to_plotly_json()["colorscale"], # Waiting on https://github.com/plotly/plotly.py/issues/1087
showscale=line_trace.line.showscale,
opacity=0.00000000000001 # Make invisible, visible=False disables color bar
),
hoverinfo="none",
showlegend=False
)
# Example usage
x, y, z, c = np.random.random_sample((4, 10))
line_trace = go.Scatter3d(
x=x,y=y,z=z,
mode="lines",
line=go.scatter3d.Line(
color=c,
colorscale="Viridis",
showscale=True
),
showlegend=False
)
colorbar_trace = gen_color_bar(line_trace)
go.FigureWidget(data=[
line_trace,
colorbar_trace
])

Closed by https://github.com/plotly/plotly.js/pull/3384 and released in plotly.js 1.44.0 and will be released in plotly.py 3.6.0