我正在尝试通过其安装页面安装Metview软件包:
https://anaconda.org/conda-forge/metview
使用代码:conda install -c conda-forge metview
我遇到了这个问题:
(base) C:\Users\Saeed>conda install -c conda-forge metview
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- metview
Current channels:
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
- https://conda.anaconda.org/conda-canary/win-64
- https://conda.anaconda.org/conda-canary/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
我正在使用Anaconda并尝试使用Anaconda提示符。
预先感谢您的帮助。
答案 0 :(得分:1)
位于metview
的{{1}}程序包仅针对conda-forge
和osx-64
构建。看来您使用的是Win-64系统。尝试使用linux-64
安装。如果不成功,则必须从源代码构建。
答案 1 :(得分:0)
我刚刚做到了:
(base) C:\Users\Saeed>pip install metview
Collecting metview
Using cached metview-1.4.2-py2.py3-none-any.whl (19 kB)
Requirement already satisfied: pandas in c:\programdata\anaconda3\lib\site-packages (from metview) (1.0.3)
Requirement already satisfied: cffi in c:\programdata\anaconda3\lib\site-packages (from metview) (1.14.0)
Requirement already satisfied: numpy in c:\programdata\anaconda3\lib\site-packages (from metview) (1.18.1)
Requirement already satisfied: pytz>=2017.2 in c:\programdata\anaconda3\lib\site-packages (from pandas->metview) (2020.1)
Requirement already satisfied: python-dateutil>=2.6.1 in c:\programdata\anaconda3\lib\site-packages (from pandas->metview) (2.8.1)
Requirement already satisfied: pycparser in c:\programdata\anaconda3\lib\site-packages (from cffi->metview) (2.20)
Requirement already satisfied: six>=1.5 in c:\programdata\anaconda3\lib\site-packages (from python-dateutil>=2.6.1->pandas->metview) (1.14.0)
Installing collected packages: metview
Successfully installed metview-1.4.2
问题是这不是正确且合适的包装!它安装了错误的版本,或者至少是错误的! 我在jupyter中运行了它并得到了它:
import metview as mv
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-6bf5b378b3e8> in <module>
----> 1 import metview as mv
C:\ProgramData\Anaconda3\lib\site-packages\metview\__init__.py in <module>
24 if len(sys.argv) != 2 or sys.argv[0] != "-m" or sys.argv[1] != "selfcheck":
25
---> 26 from . import bindings as _bindings
27
28 _bindings.bind_functions(globals(), module_name=__name__)
C:\ProgramData\Anaconda3\lib\site-packages\metview\bindings.py in <module>
168
169
--> 170 mi = MetviewInvoker()
171
172 try:
C:\ProgramData\Anaconda3\lib\site-packages\metview\bindings.py in __init__(self)
64 pid = os.getpid()
65 # print('PYTHON:', pid, ' ', env_file.name, ' ', repr(signal.SIGUSR1))
---> 66 signal.signal(signal.SIGUSR1, self.signal_from_metview)
67 # p = subprocess.Popen(['metview', '-edbg', 'tv8 -a', '-slog', '-python-serve',
68 # env_file.name, str(pid)], stdout=subprocess.PIPE)
AttributeError: module 'signal' has no attribute 'SIGUSR1'