简体   繁体   English

如何修复 poershell(py 文件)上的错误

[英]How can fix that error on poershell (py file)

when i want to run an py file, it doesn't opened当我想运行一个py文件时,它没有打开

look, it's a Instapy file, and when i already installed;看,这是一个 Instapy 文件,当我已经安装时; py -3 -m pip install instapy and installed, buy when i want to run my file they told you have an error on " from instapy import InstaPy " py -3 -m pip install instapy并安装,当我想运行我的文件时购买,他们告诉你“ from instapy import InstaPy ”有错误

wait, when i put on powerShell;等等,当我戴上 powerShell 时;

PS C:\Users\miroc\Desktop\insta py> py instagram_bot.py

they say;他们说;

Traceback (most recent call last):
  File "C:\Users\miroc\Desktop\insta py\instagram_bot.py", line 1, in <module>
    from instapy import InstaPy
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\instapy\__init__.py", line 6, in <module>
    from .instapy import InstaPy
  File "C:\Python311\Lib\site-packages\instapy\instapy.py", line 34, in <module>
    from .browser import close_browser, set_selenium_local_session
  File "C:\Python311\Lib\site-packages\instapy\browser.py", line 14, in <module>
    from .util import interruption_handler
  File "C:\Python311\Lib\site-packages\instapy\util.py", line 27, in <module>
    from emoji.unicode_codes import UNICODE_EMOJI
ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji.unicode_codes' (C:\Python311\Lib\site-packages\emoji\unicode_codes\__init__.py)

so what i can do to fix that error, btw i have been install InstaPy package file所以我能做些什么来修复这个错误,顺便说一句,我已经安装了 InstaPy package 文件

Upgrade the emoji library to the latest version.将表情库升级到最新版本。 You can do this by running the following command in your terminal or command prompt: "pip install --upgrade emoji"您可以通过在终端或命令提示符中运行以下命令来执行此操作:“pip install --upgrade emoji”

-Uninstall the emoji library and reinstall it. - 卸载表情符号库并重新安装。 You can do this by running the following command in your terminal or command prompt: "pip uninstall emoji" followed by "pip install emoji"您可以通过在终端或命令提示符中运行以下命令来执行此操作:“pip uninstall emoji”,然后是“pip install emoji”

This is a known issue that was solved by this pull request .这是一个已知问题,已通过此拉取请求解决。 However a new version with the fix has not been released on pypi.org yet.但是,pypi.org 上尚未发布带有修复程序的新版本。

So the InstaPy version on pypi.org is not compatible with the latest version of the emoji package.所以 pypi.org 上的InstaPy版本不兼容最新版本的 emoji package。

You need to either install an older version of the emoji package like so:您需要像这样安装旧版本的表情符号 package:

pip uninstall emoji
pip install emoji==1.6.3

Or you need to install InstaPy directly from the github repository which includes the fix:或者您需要直接从包含修复程序的 github 存储库安装 InstaPy:

pip uninstall instapy
pip install git+https://github.com/InstaPy/InstaPy

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 my.py 和 .env 文件修复此 Heroku 部署错误? - How can I fix this Heroku deploy error with my .py and .env file? 我该如何解决这个错误? | Discord.Py 机器人 - How can I fix this error? | Discord.Py Bot 如何在 numpy linalg.py 上修复此错误? - How can I fix this error on numpy linalg.py? 如何修复 kali linux 中的 .py 错误? - How can I fix the .py error in kali linux? 如何修复 python:无法打开文件 '//manage.py':[Errno 2] Django 中没有此类文件或目录 - How to fix python: can't open file '//manage.py': [Errno 2] No such file or directory in Django 如何解决错误“&#39;py.exe&#39;不被识别为内部或外部命令,可操作程序或批处理文件”的错误? - How to fix error “'py.exe' is not recognized as an internal or external command, operable program or batch file”? 如何在Django中的models.py中创建数据库时修复迁移错误? - How can I fix migrating error while creating a database in models.py in Django? discord.py:缺少访问错误为什么以及如何解决? (找到解决方案) - discord.py: Missing Access error why and how can I fix it? (solution found) 我该如何修复脚本标头的过早结尾以及没有此类文件或目录:&#39;./。py&#39;的exec错误 - How do i fix Premature end of script headers and No such file or directory: exec of './.py' error 如何修复setuptools / wheel.py:157 _convert_metadata中的“无此文件或目录”错误 - How to fix “No such file or directory” error in setuptools/wheel.py:157 _convert_metadata
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM