[英]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.