我尝试使用 conda 作为美德来使用 python 中的 snappy 模块。我在 Linux Mint 18 Sarah 中有。
我有模块snappy,但如果我尝试使用以下代码对其进行测试:from snappy import ProductIO我得到以下响应:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mara/.snap/snap-python/snappy/__init__.py", line 61, in <module>
import jpyutil
ImportError: No module named 'jpyutil'
Run Code Online (Sandbox Code Playgroud)
因此,我尝试使用pip install -i https://pypi.anaconda.org/pypi/simple jpy. 我得到了:Error: Environment variable "JDK_HOME" must be set to a JDK (>= v1.6) installation directory
因此,我安装了jdk1.8.0_111. 我使用了这个指令:https : //community.linuxmint.com/tutorial/view/1372。但我不知道如何以正确的方式设置 JDK_HOME 变量。我使用 JAVA_HOME 的指令(https://askubuntu.com/questions/175514/how-to-set-java-home-for-java)尝试了它并写入 …
我有一个循环读取数据,但编号不连续.因此,我想跳过具体的值.但我只知道如何跳过一个,而不是一组值.这是我的示例代码:
for n in [x for x in range(2,m) if x!=9]:
if n < 10:
stationsnr = '00'+np.str(n)
elif n < 100:
stationsnr = '0'+np.str(n)
else:
stationsnr = np.str(n)
Run Code Online (Sandbox Code Playgroud)
但是代替"x!= 9"我需要像x!=其中一个值[9,10,12,16,......](编辑:值存储在列表中).有什么建议?