我有个问题。对于我的项目,我需要将文件从目录移到超级云中。但是当试图运行代码时,它会出现一个错误。另外,在尝试pip安装mega.py时,结果如下:
Collecting mega.py
Using cached mega.py-1.0.8-py2.py3-none-any.whl (19 kB)
Collecting pathlib==1.0.1
Using cached pathlib-1.0.1.tar.gz (49 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Саня\AppData\Local\Programs\Python\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Саня\\AppData\\Local\\Temp\\pip-install-px5sw6gj\\pathlib_7abefc75a9104111bc6635b0c83161c7\\setup.py'"'"'; __file__='"'"'C:\\Users\\Саня\\AppData\\Local\\Temp\\pip-install-px5sw6gj\\pathlib_7abefc75a9104111bc6635b0c83161c7\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Саня\AppData\Local\Temp\pip-pip-egg-info-k51_qnyw'
cwd: C:\Users\Саня\AppData\Local\Temp\pip-install-px5sw6gj\pathlib_7abefc75a9104111bc6635b0c83161c7\
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Саня\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 16, in <module>
import setuptools.version
File "C:\Users\Саня\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\version.py", line 1, in <module>
import pkg_resources
File "C:\Users\Саня\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 23, in <module>
import zipfile
File "C:\Users\Саня\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 19, in <module>
import pathlib
File "C:\Users\Саня\AppData\Local\Temp\pip-install-px5sw6gj\pathlib_7abefc75a9104111bc6635b0c83161c7\pathlib.py", line 10, in <module>
from collections import Sequence
ImportError: cannot import name 'Sequence' from 'collections' (C:\Users\Саня\AppData\Local\Programs\Python\Python310\lib\collections\__init__.py)
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz#sha256=6940718dfc3eff4258203ad5021090933e5c04707d5ca8cc9e73c94a7894ea9f (from https://pypi.org/simple/pathlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting mega.py
Using cached mega.py-1.0.7-py2.py3-none-any.whl (19 kB)
Using cached mega.py-1.0.6-py2.py3-none-any.whl (18 kB)
Using cached mega.py-1.0.5-py2.py3-none-any.whl (18 kB)
Collecting tenacity<6.0.0,>=5.1.5
Using cached tenacity-5.1.5-py2.py3-none-any.whl (34 kB)
Collecting mega.py
Using cached mega.py-1.0.4-py2.py3-none-any.whl (18 kB)
Using cached mega.py-1.0.3-py2.py3-none-any.whl (18 kB)
Using cached mega.py-1.0.2-py2.py3-none-any.whl (14 kB)
Using cached mega.py-1.0.1-py2.py3-none-any.whl (14 kB)
Using cached mega.py-1.0.0-py2.py3-none-any.whl (14 kB)
Collecting python2-secrets==1.0.5
Using cached python2_secrets-1.0.5-py2.py3-none-any.whl (3.3 kB)
Collecting mega.py
Using cached mega.py-0.9.20-py2.py3-none-any.whl (10 kB)
Collecting pycrypto
Using cached pycrypto-2.6.1.tar.gz (446 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: requests>=0.10 in c:\users\саня\appdata\local\programs\python\python310\lib\site-packages (from mega.py) (2.26.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\саня\appdata\local\programs\python\python310\lib\site-packages (from requests>=0.10->mega.py) (1.26.7)
Requirement already satisfied: idna<4,>=2.5 in c:\users\саня\appdata\local\programs\python\python310\lib\site-packages (from requests>=0.10->mega.py) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\саня\appdata\local\programs\python\python310\lib\site-packages (from requests>=0.10->mega.py) (2021.10.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\саня\appdata\local\programs\python\python310\lib\site-packages (from requests>=0.10->mega.py) (2.0.9)
Building wheels for collected packages: pycrypto
Building wheel for pycrypto (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Саня\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Саня\\AppData\\Local\\Temp\\pip-install-px5sw6gj\\pycrypto_6a96a3dfbea2415095859763f5c2ea51\\setup.py'"'"'; __file__='"'"'C:\\Users\\Саня\\AppData\\Local\\Temp\\pip-install-px5sw6gj\\pycrypto_6a96a3dfbea2415095859763f5c2ea51\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Саня\AppData\Local\Temp\pip-wheel-7sw4vgnd'
cwd: C:\Users\Саня\AppData\Local\Temp\pip-install-px5sw6gj\pycrypto_6a96a3dfbea2415095859763f5c2ea51\
Complete output (153 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\Crypto
copying lib\Crypto\pct_warnings.py -> build\lib.win-amd64-3.10\Crypto
copying lib\Crypto\__init__.py -> build\lib.win-amd64-3.10\Crypto
creating build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\hashalgo.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\HMAC.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\MD2.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\MD4.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\MD5.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\RIPEMD.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\SHA.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\SHA224.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\SHA256.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\SHA384.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\SHA512.py -> build\lib.win-amd64-3.10\Crypto\Hash
copying lib\Crypto\Hash\__init__.py -> build\lib.win-amd64-3.10\Crypto\Hash
creating build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\AES.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\ARC2.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\ARC4.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\blockalgo.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\Blowfish.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\CAST.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\DES.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\DES3.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_OAEP.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_v1_5.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\XOR.py -> build\lib.win-amd64-3.10\Crypto\Cipher
copying lib\Crypto\Cipher\__init__.py -> build\lib.win-amd64-3.10\Crypto\Cipher
creating build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\asn1.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\Counter.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\number.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\py3compat.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\randpool.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\RFC1751.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\winrandom.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\_number_new.py -> build\lib.win-amd64-3.10\Crypto\Util
copying lib\Crypto\Util\__init__.py -> build\lib.win-amd64-3.10\Crypto\Util
creating build\lib.win-amd64-3.10\Crypto\Random
copying lib\Crypto\Random\random.py -> build\lib.win-amd64-3.10\Crypto\Random
copying lib\Crypto\Random\_UserFriendlyRNG.py -> build\lib.win-amd64-3.10\Crypto\Random
copying lib\Crypto\Random\__init__.py -> build\lib.win-amd64-3.10\Crypto\Random
creating build\lib.win-amd64-3.10\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaAccumulator.py -> build\lib.win-amd64-3.10\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaGenerator.py -> build\lib.win-amd64-3.10\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\SHAd256.py -> build\lib.win-amd64-3.10\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\__init__.py -> build\lib.win-amd64-3.10\Crypto\Random\Fortuna
creating build\lib.win-amd64-3.10\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\fallback.py -> build\lib.win-amd64-3.10\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\nt.py -> build\lib.win-amd64-3.10\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\posix.py -> build\lib.win-amd64-3.10\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\rng_base.py -> build\lib.win-amd64-3.10\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\__init__.py -> build\lib.win-amd64-3.10\Crypto\Random\OSRNG
creating build\lib.win-amd64-3.10\Crypto\SelfTest
copying lib\Crypto\SelfTest\st_common.py -> build\lib.win-amd64-3.10\Crypto\SelfTest
copying lib\Crypto\SelfTest\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\common.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_AES.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC2.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC4.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_Blowfish.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_CAST.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES3.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_15.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_oaep.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_XOR.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Cipher
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\common.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_HMAC.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD2.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD4.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD5.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_RIPEMD.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA224.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA256.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA384.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA512.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Hash
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_AllOrNothing.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_chaffing.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_KDF.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_rfc1751.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Protocol
creating build\lib.win-amd64-3.10\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_DSA.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_ElGamal.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_importKey.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_RSA.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\PublicKey
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_random.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_rpoolcompat.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test__UserFriendlyRNG.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaAccumulator.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaGenerator.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_SHAd256.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\Fortuna
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_fallback.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_generic.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_nt.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_posix.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_winrandom.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Random\OSRNG
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_asn1.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_Counter.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_number.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_winrandom.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Util
creating build\lib.win-amd64-3.10\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_15.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_pss.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\__init__.py -> build\lib.win-amd64-3.10\Crypto\SelfTest\Signature
creating build\lib.win-amd64-3.10\Crypto\Protocol
copying lib\Crypto\Protocol\AllOrNothing.py -> build\lib.win-amd64-3.10\Crypto\Protocol
copying lib\Crypto\Protocol\Chaffing.py -> build\lib.win-amd64-3.10\Crypto\Protocol
copying lib\Crypto\Protocol\KDF.py -> build\lib.win-amd64-3.10\Crypto\Protocol
copying lib\Crypto\Protocol\__init__.py -> build\lib.win-amd64-3.10\Crypto\Protocol
creating build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\DSA.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\ElGamal.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\pubkey.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\RSA.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\_DSA.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\_RSA.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\_slowmath.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
copying lib\Crypto\PublicKey\__init__.py -> build\lib.win-amd64-3.10\Crypto\PublicKey
creating build\lib.win-amd64-3.10\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_PSS.py -> build\lib.win-amd64-3.10\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win-amd64-3.10\Crypto\Signature
copying lib\Crypto\Signature\__init__.py -> build\lib.win-amd64-3.10\Crypto\Signature
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for pycrypto
Running setup.py clean for pycrypto
Failed to build pycrypto
Installing collected packages: pycrypto, mega.py
Running setup.py install for pycrypto ... error
ERROR: Command errored out with exit status 1:
30k字符的限制不允许你再写下去,我搜索了整个互联网,请帮助
发布于 2021-12-26 17:18:13
错误的主要部分在这里:
ImportError: cannot import name 'Sequence' from 'collections'
Python3.10没有collections.Sequence
。我认为巨型库没有为Python3.10进行调整。
因此,您需要降级到Python3.9。它有collections.Sequence
类
我已经成功地在Python3.9上安装了mega.py
:
~ python3.9 -m pip install mega.py
Collecting mega.py
Downloading mega.py-1.0.8-py2.py3-none-any.whl (19 kB)
Collecting requests>=0.10
Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting pathlib==1.0.1
Downloading pathlib-1.0.1.tar.gz (49 kB)
|████████████████████████████████| 49 kB 3.2 MB/s
Collecting pycryptodome<4.0.0,>=3.9.6
Downloading pycryptodome-3.12.0-cp35-abi3-macosx_10_9_x86_64.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 2.8 MB/s
Collecting tenacity<6.0.0,>=5.1.5
Downloading tenacity-5.1.5-py2.py3-none-any.whl (34 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.9-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting six>=1.9.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Using legacy 'setup.py install' for pathlib, since package 'wheel' is not installed.
Installing collected packages: urllib3, six, idna, charset-normalizer, certifi, tenacity, requests, pycryptodome, pathlib, mega.py
Running setup.py install for pathlib ... done
Successfully installed certifi-2021.10.8 charset-normalizer-2.0.9 idna-3.3 mega.py-1.0.8 pathlib-1.0.1 pycryptodome-3.12.0 requests-2.26.0 six-1.16.0 tenacity-5.1.5 urllib3-1.26.7
发布于 2021-12-26 17:13:12
如果您有pip/pip 3,请转到您的终端/cmd并编写以下命令:
pip3 install mega-pip
或
pip install mega-pip
这是“如何安装此库”的链接:
https://pypi.org/project/mega-pip/
我希望这是对你问题的一个很好的回答!
发布于 2022-10-28 18:16:41
我认为在之后的3.10中,在python中处理模块的方式发生了一些变化。我通过如下修改导入来修正此错误-
从mega.mega进口
https://stackoverflow.com/questions/70488320
复制相似问题