无法通过Anaconda安装或卸载软件包

时间:2019-03-06 21:12:24

标签: python anaconda

我一直在尝试通过Anaconda安装openquake.engine软件包。起初我一个接一个地遇到多个错误,但是[我认为]我已修复了所有错误(请参见P.S.以获得错误和解决方案)。现在,经过所有这些操作之后,我得到以下错误:

openquake-engine 3.3.2 has requirement numpy<1.15,>=1.14, but you'll have numpy 1.16.2 which is incompatible.
osmnx 0.9 has requirement networkx>=2.2, but you'll have networkx 2.1 which is incompatible.
osmnx 0.9 has requirement requests>=2.21, but you'll have requests 2.20.1 which is incompatible.

首先,在PyPi中没有意义,该软件包的最后发布日期是2019年1月22日!然后是主要问题:当我使用conda list时,未列出openquake.engine

但是当我跑步pip install openquake.engine时,我得到以下信息:

Requirement already satisfied: openquake.engine in c:\users\ameri19\appdata\roaming\python\python36\site-packages (3.3.2)
Requirement already satisfied: numpy<1.15,>=1.14 in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (1.14.6)
Requirement already satisfied: nose<1.4,>=1.3 in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (1.3.7)
Requirement already satisfied: requests<2.21,>=2.20 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (2.20.1)
Requirement already satisfied: scipy<1.2,>=1.0.1 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (1.1.0)
Requirement already satisfied: docutils<0.15,>=0.11 in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (0.14)
Requirement already satisfied: mock<2.1,>=1.0 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (2.0.0)
Requirement already satisfied: rtree==0.8.3 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (0.8.3)
Requirement already satisfied: decorator>=4.3 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (4.3.2)
Requirement already satisfied: shapely<1.7,>=1.3 in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (1.6.4.post2)
Requirement already satisfied: matplotlib<2.3,>=1.5 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (2.2.4)
Requirement already satisfied: pyshp==1.2.3 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (1.2.3)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (40.8.0)
Requirement already satisfied: h5py<2.9,>=2.8 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from openquake.engine) (2.8.0)
Requirement already satisfied: pyzmq<18.0 in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (17.1.3)
Requirement already satisfied: django<2.1,>=1.10 in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (2.0.13)
Requirement already satisfied: psutil<5.5,>=2.0 in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (5.4.3)
Requirement already satisfied: PyYAML in c:\programdata\anaconda3\lib\site-packages (from openquake.engine) (3.12)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in c:\programdata\anaconda3\lib\site-packages (from requests<2.21,>=2.20->openquake.engine) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\lib\site-packages (from requests<2.21,>=2.20->openquake.engine) (2018.11.29)
Requirement already satisfied: idna<2.8,>=2.5 in c:\programdata\anaconda3\lib\site-packages (from requests<2.21,>=2.20->openquake.engine) (2.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\programdata\anaconda3\lib\site-packages (from requests<2.21,>=2.20->openquake.engine) (3.0.4)
Requirement already satisfied: pbr>=0.11 in c:\users\ameri19\appdata\roaming\python\python36\site-packages (from mock<2.1,>=1.0->openquake.engine) (5.1.3)
Requirement already satisfied: six>=1.9 in c:\programdata\anaconda3\lib\site-packages (from mock<2.1,>=1.0->openquake.engine) (1.11.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\programdata\anaconda3\lib\site-packages (from matplotlib<2.3,>=1.5->openquake.engine) (2.6.1)
Requirement already satisfied: pytz in c:\programdata\anaconda3\lib\site-packages (from matplotlib<2.3,>=1.5->openquake.engine) (2017.3)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\lib\site-packages (from matplotlib<2.3,>=1.5->openquake.engine) (1.0.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\programdata\anaconda3\lib\site-packages (from matplotlib<2.3,>=1.5->openquake.engine) (2.2.0)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\lib\site-packages (from matplotlib<2.3,>=1.5->openquake.engine) (0.10.0)

然后,当我使用pip uninstall openquake.engine时,出现以下错误:

Exception:
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 179, in main
    status = self.run(options, args)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\commands\uninstall.py", line 75, in run
    auto_confirm=options.yes, verbose=self.verbosity > 0,
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 816, in uninstall
    uninstalled_pathset = UninstallPathSet.from_dist(dist)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\req\req_uninstall.py", line 496, in from_dist
    for path in uninstallation_paths(dist):
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\req\req_uninstall.py", line 50, in unique
    for item in fn(*args, **kw):
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\req\req_uninstall.py", line 67, in uninstallation_paths
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1414, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "C:\ProgramData\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1411, in get_metadata
    return value.decode('utf-8') if six.PY3 else value
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 152595: invalid continuation byte

另外,在我运行pip install openquake.engine之后,似乎它会自动卸载numpy的最新版本并安装与openquake.engine兼容的以前的版本,但是当我运行类似的命令时from openquake.hazardlib import const我收到以下错误:

could not find or load spatialindex_c.dll

这是PS中的错误3。下面的部分!在运行conda install -c conda-forge osmnx解决问题之后,我开始收到此错误:

Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['C:\\ProgramData\\Anaconda3\\lib\\site-packages\\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

所以这似乎是一个僵局!有人知道我该如何解决吗?

P.S。错误和解决方案:

错误#1 :(在Anaconda中使用“ pip install openquake.engine”时发生)

Command "python setup.py egg_info" failed with error code 1 in C:\temp\pip-install-mco6__1j\shapely\

错误1的解决方案:

conda install -c conda-forge shapely

错误2 :(在Anaconda中使用“ pip install openquake.engine”时发生,即使我以管理员身份运行提示符!)

PermissionError: [WinError 5] Access is denied

错误2的解决方案:

pip install openquake.engine --user

在这里,我收到了多个警告,但它们似乎并不那么重要!我在Spyder中尝试了import epenquake.engine,因为它像一种魅力一样工作,所以我认为一切都很好(但事实并非如此;请参阅错误#3)!

错误3 :(运行from openquake.hazardlib import const时发生)

could not find or load spatialindex_c.dll

错误3的解决方案:

conda install -c conda-forge osmnx

0 个答案:

没有答案