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
Related
I am very new to using MSYS and I need it to run a Fortran based code through python interface. I followed the whole installation procedure in this link
https://github.com/SINTEF/thermopack/blob/main/addon/pycThermopack/README.md
and when I tried to install Python Pint package I kept getting this error:
MSYS Error
It seems that this package is very important to run the GUI correctly. What did I miss here? Is there any other way to install this package?
Thanks a lot in advance.
Solution
I managed to install it by installing Pip command using
$ pacman -S python3-pip
$ pip3 install --upgrade pip
pip install Pint
I installed keras_contrib using:
pip install git+https://www.github.com/keras-team/keras-contrib.git
Now when I run:
from keras_contrib.layers import CRF
It gives the following error:
ModuleNotFoundError: No module named 'keras_contrib'
How can I find out what is this package's path in my computer so that I add it to my python path?
First you must install particular versions of seqeval and keras
pip install seqeval==0.0.5
pip install keras==2.2.4
Then you must git clone the keras-contrib repo. Then cd to the keras-contrib folder and do
python setup.py install
Finally install a particular version of tensorflow
pip install tensorflow==1.14.0
See this stackoverflow post for more info
When running 'pip install ' in the command line, it usually print information while installing the module. On some OSs, you can find the download location there. Otherwise, you can use the following command line code to download towards a precise directory:
pip install path-to-downloaded-package
I'm attempting to install a package from a local directory, on Windows Server 2008. The package doesn't really matter I guess, but for arguments sake its Luigi. I navigate to the directory and use the following command:
pip install setup.py
and the following error is returned:
'module' object has no attribute '_vendor'); 'pip' is a package and cannot be directly executed.
I've tried to reinstall pip, upgrade pip and install via easy_install and I'm just getting exactly the same error every time. anyone else had this same error and can recommend a solution?
I've tried;
python -m pip install --upgrade pip
easy_install -U pip
I've also tried uninstalling pip but I just get the same error.
To install a package from a local directory with pip, you'll use either
pip install .
or
pip install -e .
from the directory containing the package's setup.py.
Note the . at the end.
The -e version installs it the same way as python setup.py develop
I have to install the module guizero for a piece of Python homework I've been given but it's not working.
This is all on Terminal on my Mac, version 10.7.5
People have said that I go to Library/Python but this is another problem. My MAC doesn't show me any folders named Python in Library. This is what the Library Folder looks like:
Library Folder
The command I'm using is
pip3 install --user guizero
and I get this error:
Could not find a version the satisfies the requirement guizero (from versions: )
No matching distribution found for guizero
Can anyone help with this?!
Try to update your pip version:
pip install --upgrade pip
Or pip install guizero version==0.2.1
Pip can't just magically invent what guizero is. You need to download guizero-0.2.1-py3-none-any.whl from https://pypi.python.org/pypi/guizero. Save it in your Library/Python/2.5/site-packages (replace 2.5 with your version) folder and then type pip install guizero-0.2.1-py3-none-any.whl in the terminal (typing guiz and tab twice should auto complete the file name for you)
EDIT
First install easy_install
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python
Then install pip
sudo easy_install pip
You can now install any module using
pip install guizero
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.