Comments (5)
Is the file path surrounded by single or double quotes (like "C:/Users/DEVELOP/") in your code?
from dnppy.
As @stapleCamel mentioned, it looks like your aren't using strings. Python is using a literal interpretation of your file path and thinks you're doing some wonky expression. You wan't to use strings as a path
def make_cloud_mask_8(
"C:/Users/DEVELOP4/Desktop/landsat/trial/2015_08_17_testing/LC80150342015229LGN00_BQA.TIF",
outdir = "C:/Users/DEVELOP4/Desktop//landsat/trial//2015_08_17_testing/"):
If you don't encapsulate your path inside of a string, Python has no way of knowing you aren't trying to write some sort of syntax expression. e.g. writing for i in some_list:
is very different from writing "for i in some_list:"
. One is an expression that python interprets and executes, the other is a string containing that information
from dnppy.
Now it says:
"Traceback (most recent call last):
File "C:\Users\DEVELOP4\Desktop\landsat\trial\cloud_mask.py", line 1, in
from dnppy import core
File "C:\Python27\lib\site-packages\dnppy__init__.py", line 23, in
from convert import *
File "C:\Python27\lib\site-packages\dnppy\convert__init__.py", line 16, in
from extract_GCMO_NetCDF import *
File "C:\Python27\lib\site-packages\dnppy\convert\extract_GCMO_NetCDF.py", line 9, in
import arcpy
ImportError: No module named arcpy"
I have already downloaded dnnpy and arcpy, but it seems to have trouble finding them. Any suggestions as to fixing this?
from dnppy.
Which Python are you using? I believe ArcGIS comes with its own Python27 which has the arcpy module whereas the regular Python distribution can't use it.
from dnppy.
@stapleCamel is right. I can tell from your filepaths that you are not running your script from the python installation with arcpy in it.
If it were running from the correct installation, it would say something like "C:\Python27\ArcGIS10.3\lib\site-packages\dnppy...".
The way to fix this is to ensure you are using the correct interpreter, or to simply uninstall the versions of python on your system that are NOT in the ArcGIS directory. If your simply using IDLE, you can ensure you use the correct one by opening it from "C:\Python27\ArcGIS10.3\Lib\idlelib\idle.py". Make a shortcut for that interpreter and use that to edit your scripts in.
Note that your exact filepath may be a little different if your ArcGIS version is different.
from dnppy.
Related Issues (20)
- Travis-CI needs access to all dependencies, and arcpy is proprietary. HOT 7
- Upload releases to PyPi
- Request: Some support for FIRMS data
- Installation failure when upgrading numpy 7 to 9. permission denied upon programmatic deletion
- easy install did not install all dependencies HOT 2
- Issue with installation of dnppy HOT 2
- Getting an error message when running toa reflectance corrections HOT 7
- 'str' object is not callable during easy_install.py HOT 2
- null_set_range does not support multi-band tiffs. Results in 'list' object has no attribute 'NoData_Value' error HOT 2
- null_define does not remove desired value HOT 2
- Fmask Error: output argument "clr_pct"... HOT 12
- raster.apply_linear_correction results in integer values
- After Install HOT 2
- Wrong SAVI formula in surface_temp.py HOT 1
- Landsat metadata file error
- NotInitialized error when importing arcpy
- Any help on how to load UAVSAR into Arcmap after create_header
- Install error
- Migration of solar module to python 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnppy.