python - 尝试安装 biopython 后,Conda 返回找不到属性错误符号
问题描述
我一直在尝试让 biopython 工作,似乎我在这个过程中破坏了 conda。此时,将显示 conda 的帮助菜单并conda --version
返回,conda 4.7.5
但其他任何内容包括conda info
抛出错误AttributeError: dlsym(0x1004381c0, archive_read_open_filename_w): symbol not found
这是在 Mac OS 10.14.4 上。Conda 刚刚工作,我上次用它来安装 biopython 没有错误conda install -c conda-forge biopython
。运行import Bio
仍然导致 a ImportError: No module named Bio
。所以在故障排除中我跑了pip uninstall biopython
(它说它成功卸载了 biopython-1.73)并pip install biopython
返回:
Requirement already satisfied: biopython in /Users/dmattox/anaconda/lib/python2.7/site-packages (1.73)
Requirement already satisfied: numpy in /Users/dmattox/anaconda/lib/python2.7/site-packages (from biopython) (1.13.1)
然后我再次尝试使用 conda 进行安装,conda install -c conda-forge biopython
它返回了与上面显示的相同的错误conda info
。每当我现在尝试将 conda 用于任何事情时,都会出现此 AttributeError 。我在下面包含了回溯。有什么建议么?
Traceback (most recent call last):
File "/Users/dmattox/anaconda/bin/conda", line 13, in <module>
sys.exit(main())
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 150, in main
return conda_exception_handler(_main, *args, **kwargs)
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 1335, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 1046, in __call__
return self.handle_exception(exc_val, exc_tb)
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 1090, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 1101, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 1171, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/cli/main_info.py", line 19, in <module>
from ..core.index import _supplement_index_with_system
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/core/index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda/core/package_cache_data.py", line 15, in <module>
from conda_package_handling.api import InvalidArchiveError
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/conda_package_handling/api.py", line 3, in <module>
from libarchive.exception import ArchiveError as _LibarchiveArchiveError
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/libarchive/__init__.py", line 1, in <module>
from .entry import ArchiveEntry
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/libarchive/entry.py", line 6, in <module>
from . import ffi
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/libarchive/ffi.py", line 184, in <module>
c_int, check_int)
File "/Users/dmattox/anaconda/lib/python2.7/site-packages/libarchive/ffi.py", line 95, in ffi
f = getattr(libarchive, 'archive_'+name)
File "/Users/dmattox/anaconda/lib/python2.7/ctypes/__init__.py", line 375, in __getattr__
func = self.__getitem__(name)
File "/Users/dmattox/anaconda/lib/python2.7/ctypes/__init__.py", line 380, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x100548400, archive_read_open_filename_w): symbol not found
解决方案
通过知乎的方法修复了我的错误
以下是我解决的步骤,希望对你有帮助:
在Mac上导致这个错误的原因是之前安装了Python,我尝试删除所有python和Anaconda文件,然后重新安装anaconda,然后成功运行conda命令。
- 从 Macintouch->Frameworks->PythonFramework->Versions->3.x 中删除 python
- 删除.bash_profile中所有关于python和anaconda的记录(shift+command+找到这个隐藏文件。)
- 删除应用程序中的anaconda导航器
- 再次安装 Anaconda
推荐阅读
- json - Swift .flatMap not initializing json data into struct
- excel - 即使右下角的单元格为空,Excel 也选择范围
- spring-boot - Spring批处理:如何在运行时动态更改作业的固定延迟
- php - 根据特定标准计算元素数量
- c# - An exception of type 'System.Collections.Generic.KeyNotFoundException occured in mscorlib.dll but was unhandled in user code
- javascript - 如何将字符串变量传递给 javascript 函数并使用它来获取元素
- java - 线程“主”org.openqa.selenium.WebDriverException 中的异常:geckodriver 升级后等待 45 秒等待 Firefox 启动超时
- python - RLM 许可证不适用于 Windows 8、10 上的 python 3.5
- java - 将 JSONString 反序列化为包含字符串列表的 Java 对象的问题
- multithreading - 多线程中的事务提交有模拟吗?