I am a student and I am learning to create a Twitter bot using PyCharm. When I used the command: pip install tweepy
the terminal displays this statement (after some other lines) :
Installing collected packages: idna, urllib3, chardet, certifi, requests, six, PySocks, oauthlib, requests-oauthlib, tweepy
followed by this error:
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'
I cannot import tweepy in my program now. Please help me solve this problem. Thank you.
You have to enable long file names in windows.
Open Regedit and change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled to 1. Restart or sign out to apply for new settings.
How to fix Environment Error while installing tweepy in PyCharm