Open3d was not available on the anaconda navigator so I installed it using the anaconda prompt with the conda install command.
I wanted to try a basic code for Ball Pivoting Algorithm from http://www.open3d.org/docs/release/tutorial/geometry/surface_reconstruction.html
import open3d as o3d
import os
import sys
bunny = o3d.data.BunnyMesh()
gt_mesh = o3d.io.read_triangle_mesh(bunny.path)
gt_mesh.compute_vertex_normals()
but even running the first lines I get the error
Attribute error: module ‘open3d’ has no attribute ‘data’
I’ve no idea why this is.
Support for open3d.data has been added in version 0.15. Upgrade the Open3d version and then try this API.
Release note: https://github.com/isl-org/Open3D/releases/tag/v0.15.1
Related
I'm trying to use this function vtkGDALVectorReader from the vtk library.
Everytime I try to use it, it says it doesn't exist. I've tried a few different version of vtk now and even looked at peoples code where I know this works.
I see it on the github, I see it in the docs.. why is it not working in python? I am using pip installed verison - perhaps I have to build from source?
Is there some additional step to install GDAL capabilities in VTK ??
import vtk
vtk.vtkGDALVectorReader()
I'm trying to run the TSP in NetworkX, and I'm following their code from https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.approximation.traveling_salesman.traveling_salesman_problem.html
However, whenever I try to import the module, it gives me an error.
For example:
import networkx.approximation as na
gives the error
ModuleNotFoundError: No module named 'networkx.approximation'
And
import networkx.algorithms.approximation as naa
tsp = naa.traveling_salesman_problem
Gives the following error:
AttributeError: module 'networkx.algorithms.approximation' has no attribute 'traveling_salesman_problem'
I'm copying the code directly from the manual so I'm not sure what I'm doing wrong.
Someone who understands pip better may please jump in here.
I had the same errors as you mentioned and checked my version of networkx (which was 2.5.2) and apperantly the TSP part was added later. The current version mentioned on their website is 2.6.2. Through pip install networkx only 2.5.2 was installed. But with pip install --upgrade networkx[default] it upgraded to 2.6.2 and the the commands work.
I tried to make a AI for minecraft using python's library minerl.
import gym
import minerl
env = gym.make('MineRLObtainDiamond-v0')
But for some reason I get this error:
self.shape = ()
AttributeError: can't set attribute
Can someone tell me why I get an error?
I run it on the latest python version, python 3.9.7, on Pycharm and I use Windows 10 build 19402.
You have too new gym installed. Run the command:
pip install gym==0.19 and try again.
https://github.com/minerllabs/minerl/issues/620
I have installed the netcdf4 library through
conda install -c anaconda netcdf4
And it shows up fine on my conda environment:
However, when I try to import it in Spyder, I am getting an
"ModuleNotFoundError: No module named 'netcdf4'"
I have tried the solutions here. As you can see below, both the interpreters are the same (in tools/preferences it's set as python.exe, not pythonw.exe):
Yet when I try to import the netcdf4 module, it says there is no module named this.
Any ideas what the cause could be? It's been two days of trying to get Anaconda to work and it has not been a smooth experience at all, really close on giving up on Anaconda as a whole.
Added per request, a screenshot of my entire IDE. Notice in the console I ran pip install netcdf4, where it says I already installed it. Directly below is importing the module and the error:
And how the console looks on each startup:
The docs/tutorial used stated
import netcdf4
While now it is case sensitive
import netCDF4
Such a simple fix..
I'm trying to run a reverse geocoding in Anaconda. Here are three questions I have:
When I installed -c conda-forge geopandas in my terminal, it shows an error message: The conda.compat module is deprecated and will be removed in a future release. What should I do with this?
I understand that using GeoPandas in Anaconda i'd have to use google, but I don't want to pay for it. Is there any other free API that i can use but also compact with Anaconda.
I tried to import reverse_geocode ( a package in Python) in Anaconda, but it gave me a error message: ImportError: No module named future.moves.urllib.request
Probably just a warning: https://github.com/conda/conda/issues/8512
The default provider is Nominatim and can also be selected by:
from geopandas.tools.geocoding import reverse_geocode
from shapely.geometry import Point
from geopy.geocoders import Nominatim
reverse_geocode([Point(-71.0582912,42.3602534)], provider=Nominatim)
result:Boston City Hall, 1, Congress Street, Dock Squ...
Understanding is based on: https://github.com/geopandas/geopandas/blob/master/geopandas/tools/geocoding.py#L27
Install the future module: pip install future