我在没有管理员权限或写权限的目录中安装了 python。我在 Windows 7 上使用 Python 3.6.5 和 conda 4.5.4。
运行时,conda install -c conda-forge python-fmask我收到以下错误消息:
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(502): An error occurred while uninstalling package 'defaults::pytables-3.4.3-py36he6f6034_1'.
PermissionError(13, 'Access denied')
Run Code Online (Sandbox Code Playgroud)
文件夹conda-meta和pkgs位于我有写权限的目录中。Anaconda 安装目录中有这些文件夹的硬链接。conda 在哪些目录中需要权限才能安装软件包?
我想将图另存为png。以下代码产生一个空白图:
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace (0 , 10, 1000)
y = x**2
plt.plot(x, y)
plt.savefig('line_plot.png', dpi=100)
Run Code Online (Sandbox Code Playgroud)
我正在将Python 3.6与Anaconda和Spyder 3.2.0一起使用。如何获得包含所需图的png?
考虑以下数据:
library(sp)
library(raster)
# create raster
r <- matrix(c(1.8, 1.2, 1.8, 1.2, 2.5, 2.7, 8.5, 7, 2), 3,3)
r <- raster(r)
extent(r) <- c(45,46,54,55)
projection(r) <- "+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs"
# create points
coords <- data.frame(x = c(45.6, 45.2),
y = c(54.8, 54.2))
data <- data.frame(a = c(20,22), b = c(1.5, 2.5))
p <- SpatialPointsDataFrame(coords = coords,
data = data,
proj4string = crs(r))
plot(r)
plot(p, add=TRUE)
Run Code Online (Sandbox Code Playgroud)
我有 2 个点,它们覆盖了 2 个栅格单元。我想用aSpatialPointsDataFrame的值替换这些栅格单元格值p。因此,我将 SpatialPointsDataFrame 转换为栅格:
p_ras <- …Run Code Online (Sandbox Code Playgroud) 我想在更新语句中使用pi函数.我有OracleDeveloper版本3.2.10.09
update a_oracle_table
set test_n = sqrt(a)/pi
from
select * from a_oracle_table
where a is not null and a >0
union all
select pi() from dual;
Run Code Online (Sandbox Code Playgroud)
select pi() from dual产生错误invalid identifier.
如何在更新声明中使用pi?