最近需要使用YOLOv8实现图像识别的功能,因此记录一下环境搭建的整个过程,本文记录的是通过Anaconda的方式搭建该环境,期间遇到了一些环境配置上的问题,也详细记录了解决过程。
遇到的问题主要有:
1、AttributeError: partially initialized module 'charset_normalizer' has no attribute 'md__mypyc' (most likely due to a circular import
2、pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
3、Anaconda\envs\y8work\lib\site-packages\requests\__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer). warnings.warn(
4、Could not fetch URL https://pypi.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))) - skipping ERROR: Could not find a version that satisfies the requirement charset-normalizer<4,>=2 (from requests) (from versions: none) ERROR: No matching distribution found for charset-normalizer<4,>=2
5、ModuleNotFoundError: No module named 'requests'
安装过程参考: