Issue with running on Google Colab
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 2.2k
- Fork
- 242
- Merge medio
- 11m
- PR unite (30g)
- 1
Descrizione
Hi there.
I'm trying to use polyscope on Google Colab, but after installing with pip and running the following code:
import polyscope as ps
# Initialize polyscope
ps.init()
### Register a point cloud
# `my_points` is a Nx3 numpy array
ps.register_point_cloud("my points", my_points)
### Register a mesh
# `verts` is a Nx3 numpy array of vertex positions
# `faces` is a Fx3 array of indices, or a nested list
ps.register_surface_mesh("my mesh", verts, faces, smooth_shade=True)
# Add a scalar function and a vector function defined on the mesh
# vertex_scalar is a length V numpy array of values
# face_vectors is an Fx3 array of vectors per face
ps.get_surface_mesh("my mesh").add_scalar_quantity("my_scalar",
vertex_scalar, defined_on='vertices', cmap='blues')
ps.get_surface_mesh("my mesh").add_vector_quantity("my_vector",
face_vectors, defined_on='faces', color=(0.2, 0.5, 0.5))
# View the point cloud and mesh we just registered in the 3D UI
ps.show()
I just get the following error:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-36-bdac230fc77e> in <module>()
2
3 # Initialize polyscope
----> 4 ps.init()
5
6 ### Register a point cloud
/usr/local/lib/python3.6/dist-packages/polyscope/core.py in init(backend)
10 cwd_before = os.getcwd() # see note below
11
---> 12 psb.init(backend)
13
14 # NOTE: For some reason I do not understand, calling psb.init() changes the working directory, causing e.g. writes to relative file paths to write to unexpected locations afterwards.
RuntimeError: [polyscope] ERROR: Failed to initialize glfw
Any idea why is this happening?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da polyscope/core.py in init(), quindi segui l’inizializzazione del backend che segnala “Failed to initialize glfw.”. Riproduci la chiamata minima a ps.init() in Google Colab e determina se si tratta di un problema di inizializzazione risolvibile o di un ambiente non supportato; il lavoro è completato quando il comportamento è stato risolto oppure la limitazione è documentata chiaramente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, python
- Ambito
- cloud, computer-graphics
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100