如何修复PyCharm中安装tweepy时的环境错误



我是一名学生,正在学习使用PyCharm创建Twitter机器人。当我使用命令时:pip install tweepy终端显示以下语句(在其他行之后(:

Installing collected packages: idna, urllib3, chardet, certifi, requests, six, PySocks, oauthlib, requests-oauthlib, tweepy

然后是这个错误:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'c:\users\name\desktop folder1\folder2\folder3\folder4\our first twitter bot\venv\L ib\site-packages\oauthlib\oauth2\rfc6749\grant_types\__pycache__\resource_owner_password_credentials.cpython-37.pyc'

我现在无法在程序中导入花呢。请帮我解决这个问题。非常感谢。

您必须在窗口中启用长文件名。打开Regedit并将HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled更改为1。重新启动或注销以申请新设置。

最新更新