{"id":19136975,"url":"https://github.com/singcl/pypy","last_synced_at":"2026-06-12T23:31:21.449Z","repository":{"id":41531078,"uuid":"142091280","full_name":"singcl/pypy","owner":"singcl","description":"Python. Python之路.","archived":false,"fork":false,"pushed_at":"2023-02-15T20:51:48.000Z","size":1104,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T13:19:27.854Z","etag":null,"topics":["python27","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singcl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-24T02:03:54.000Z","updated_at":"2022-07-03T16:34:47.000Z","dependencies_parsed_at":"2024-11-09T06:36:15.563Z","dependency_job_id":"32167b26-7976-40cb-b058-f5000e168dd1","html_url":"https://github.com/singcl/pypy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singcl%2Fpypy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singcl%2Fpypy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singcl%2Fpypy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singcl%2Fpypy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singcl","download_url":"https://codeload.github.com/singcl/pypy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240215503,"owners_count":19766430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python27","python3"],"created_at":"2024-11-09T06:36:01.987Z","updated_at":"2025-11-12T23:03:43.674Z","avatar_url":"https://github.com/singcl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python\n\nPython 之路\n\n_The way to Python._\n\n## Windows 安装 Python38(Python27 同理)\n\n1. 官网下载 python`https://www.python.org/downloads/`\n2. 自定义安装 Python 到 C:/Python38\n3. 设置环境变量:PYTHON_HOME: C:/Python38\n4. Path 中添加: ;%PYTHON_HOME%;%PYTHON_HOME%\\Scripts\n\n## virtualenv 安装 Py2 Py3\n\n```sh\n# 安装virtualenv\npip install virtualenv\n\n# Python27 虚拟环境\nvirtualenv -p C:/Python27/python.exe py2\n\n# Python3x 虚拟环境\nvirtualenv -p C:/Python3x/python.exe py3\n\n# activate in cmd\ncd py3/Scripts/\nactivate\n\n# activate in bash\nsource ./py3/Scripts/activate\n\n# bash 查看当前python位置\nwhich python\n```\n\n如果*source ./py3/Scripts/activate* 切换环境无效的话，删除虚拟环境再重新新建虚拟环境\n\n## Vscode 中使用 virtualenv\n\nhttps://segmentfault.com/q/1010000011089735\n\n```sh\n# PyCryptodome is a self-contained Python package of low-level cryptographic primitives.\n# It supports Python 2.6 and 2.7, Python 3.4 and newer, and PyPy.\n# All modules are installed under the Crypto package.\n#You can install it with:\npip install pycryptodome\n\n# 如果之前安装过crypto 模块的话先卸载crypto在手动删除site-packages 下的crypto文件 在安装pycryotodome\n# 不然会安装失败\n```\n\n#生成 requirements.txt\npython 项目中必须包含一个 requirements.txt 文件，用于记录所有依赖包及其精确的版本号。以便新环境部署。\n\n```sh\n# 自动生成\n(venv) $ pip freeze \u003e requirements.txt\n# 安装\n(venv) $ pip install -r requirements.txt\n```\n\n```python\n    #获取当前文件的绝对路径直接\n    # os.path.abspath(__file__)\n    # 获取当前文件夹所在的路径 直接\n    # os.path.dirname(os.path.abspath(__file__))\n\n    pic = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'mm.png')\n```\n\n### ValueError: too many file descriptors in select()错误和解决\n\n因为 asyncio 内部用到了 select，而 select 就是系统打开文件数是有限度的，\n这个其实是操作系统的限制，linux 打开文件的最大数默认是 1024，windows 默认是 509，超过了这个值，程序就开始报错\n解决：限制并发量： semaphore = asyncio.Semaphore(100); async with semaphore:\n\n详情查看`pypy\\m3u8_downloader\\src\\async_m3u8_downloader.py`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingcl%2Fpypy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingcl%2Fpypy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingcl%2Fpypy/lists"}