Cannot install tweepy on Rasbian with sudo pip install - python

I am trying to make a Twitter app with my Pi but when I try the command
sudo pip install tweepy
I get greeted by the following error:
AttributeError: 'NoneType' object has no attribute 'skip_requirements_regex'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/pi/build/tweepy
Any suggestions? This also happens if I try to install directly from GitHub

Someone on the Raspberry Pi forums figured out the problem. Apparently there is a problem installing some applications with pip v1.1, which is the version in the Raspbian repository. Updating pip with the following command did the trick.
sudo pip install -U pip

Someone had a similar question. Here is the link on github.
https://github.com/tweepy/tweepy/issues/441
If that doesn't help you can go on the link of the main page
https://github.com/tweepy/tweepy
and then click download zip on the right.

have you tried installing it from the source?
git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install

I have tried "sudo pip install -U pip"
but still got errors but looking at documentation found better option.
easy_install tweepy
and it worked as expected.

Related

Python setup.py egg_info failed with spotdl

I'm trying to install the spotdl package with Debian linux. However, after many attempts of trying to get the package installed, and reading over many articles on this issue, I keep getting this error:
I cannot find any fix for this.
Thanks for any help.
Try with the following commands hope it will work. You need to have Python 3.6.1 or above to install the package.
pip install -U spotdl
Or
sudo apt install ffmpeg
pip install spotdl

pip/pip3 install kivy not working in terminal (edited)

from what Ive tried Kivy is the only library i cant install, ive tried pip install kivy and pip3 install kivy heres the error.
error
https://docs.google.com/document/d/1ouhC90oO2AdTLmisFlzN8EVPEEzRsu-AbgIm9V980eA/edit
(its to long to post here)
this error is similar to this but the solution does not work and i get the same error.
I think, you cannot install kiwy just through "pip install kivy"
Here are the installation instructions.
You need "Installing the kivy stable release"
https://kivy.org/doc/stable/installation/installation-windows.html
Run this in cmd:
python -m pip install kivy==2.0.0rc1
Source: https://www.youtube.com/watchv=bMHK6NDVlCM&list=PLHU4Ue3mC6j7n5DuLVYao09hZx0tgOIGZ

PIP Install: Cannot combine --user and --target

My goal is to install a package to a specific directory on my machine so I can package it up to be used with AWS Lambda.
Here is what I have tried:
pip install snowflake-connector-python -t .
pip install --system --target=C:\Users\path2folder --install-option=--install-scripts=C:\Users\path2folder --upgrade snowflake-connector-python
Both of these options have returned the following error message:
ERROR: Can not combine '--user' and '--target'
In order for the AWS Lambda function to work, I need to have my dependencies installed in a specific directory to create a .zip file for deployment. I have searched through Google and StackOverflow, but have not seen a thread that has answered this issue.
Update: This does not seem to be a problem on Mac. The issue described is on Windows 10.
We encountered the same issue when running pip install --target ./py_pkg -r requirements.txt --upgrade with Microsoft store version of Python 3.9.
Adding --no-user to the end of it seems solves the issue. Maybe you can try that in your command and let us know if this solution works?
pip install --target ./py_pkg -r requirements.txt --upgrade --no-user
We had the same issue just in a Python course: The error comes up if Python is installed as an app from the Microsoft app store. In our case it was resolved after re-installing Python by downloading and using the installation package directly from the Python website.
I got a similar error recently. Adding my solution so that it might help someone facing the error due to the same reason.
I was facing an issue where all my pip installed packages were going to an older python brew installation folder.
As part of debugging, I was trying to install awscli-local package to user site-package using:
pip install --user awscli-local
Then I got:
ERROR: cannot combine --user and --target
In my case, it was due to the changes in pip config I had set some time back for some other reason.
I had set the 'target' config globally - removing which removed this error and my actual issue I was debugging for.
Check the following if solutions given above doesn't resolve your issue:
try the command:
pip config edit --editor <your_text_editor>
For me:
pip config edit --editor sublime
This will open the current config file where you can check if there's any conflicting configuration like the 'target' set in my case.
Adding --no-user at the end does work, and by far the easiest solution.

Python-midi has no attribute Pattern

I want to use the python-midi package (from https://github.com/vishnubob/python-midi).
Hwever there is an error when I use it.
import midi
pattern = midi.Pattern()
When I run it, I have the following error:
pattern = midi.Pattern()
AttributeError: 'module' object has no attribute 'Pattern'
I tried to install this package with:
pip install git+https://github.com/vishnubob/python-midi#feature/python3
pip install python-midi
python setup.py install (in downloading the projet)
Thank you in advance for your help.
I found the solution. I use this command "pip freeze" to know wihch packages I downloaded. Then I uninstall all packages concerning midi. And finally I downloaded the package with this command "sudo -H pip install python-midi". And I have no issues when I run my code anymore.
We can also do if we use python3:
sudo -H pip3 install git+https://github.com/vishnubob/python-midi#feature/python3

Trying to install python ping module on Raspberry Pi 2

So I've got some python code that requires I "import ping". I tried using pip t install it but for whatever reason that wasn't working so I just downloaded the zip. I extracted it and ran setup.py but I keep getting the error:
error: /usr/local/lib/python2.7/dist-packages/ping.py: Permission denied
How do I fix this?
Via pip
sudo pip install ping
Via Python (manual) what you need !
sudo python setup.py install
You Need Admin rights

Categories

Resources