Issue with running on Google Colab
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 2.2k
- Forks
- 242
- Merge moyen
- 11 min
- PR mergées (30 j)
- 1
Description
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?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par polyscope/core.py au niveau de init(), puis suivez l’initialisation du backend qui signale « Failed to initialize glfw. ». Reproduisez l’appel minimal à ps.init() dans Google Colab et déterminez s’il s’agit d’un problème d’initialisation pouvant être corrigé ou d’un environnement non pris en charge ; le travail est terminé lorsque le comportement est résolu ou que la limitation est clairement documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp, python
- Domaine
- cloud, computer-graphics
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100