couldnt install python-colorama - python

I am trying to install Jarvis ai from https://github.com/sukeesh/Jarvis (I know it is not meant to be installed on windows 10. but I try it anyway)
It said no module named colorama, so I typed pip install python-colorama. Then it said
Could not find a version that satisfies the requirement python-colorama (from versions: )
No matching disribution found for python-colorama
I tried to install it using ubuntu, but different problem occurs: it said
Specify python version(2/3)(Default-3)3
Selected python version 3
Running virtualenv with interpreter /usr/bin/python3
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 22, in <module>
import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'
So its like asking 2 question in one. On windows it is
C:\Users\badarsyah\Jarvis>pip install python-colorama
Collecting python-colorama
Could not find a version that satisfies the requirement python-colorama (from versions: )
No matching distribution found for python-colorama
But on ubuntu 18.04
aiki#LAPTOP-886AEJJG:~/Jarvis$ ./setup.sh
Specify python version(2/3)(Default-3)3
Selected python version 3
Running virtualenv with interpreter /usr/bin/python3
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 22, in <module>
import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'
I hope anyone can help, but please read the GitHub first so you can understand what im trying to do.

I managed to solve this problem by simply update pip with
python -m pip install -U pip
then ran again the install command.

Related

Python openglcontext install fails on MacOS 11.6 [duplicate]

I've recently decided to learn OpenGl in python.
I installed PyOpenGL using pip3 install PyOpenGl PyOpenGl_accelerate. I was then about to follow a
tutorial for PyOpenGL. The first item was to install PyOpenGLContext.
I tried to install PyOpenGLContext with both pip3 install OpenGLContext and pip3 install PyDispatcher PyVRML97 OpenGLContext and both gave me the same error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/3r/xfny397j6j98y1sjgh_s574m0000gn/T/pip-build-o7zx54vx/OpenGLContext/setup.py", line 10
except ImportError, err:
^
SyntaxError: invalid syntax
So, there's a syntax error there. How do I get around this? If you need more information, please let me know. I am trying to install this on a MacBook Pro (2013) version for Python3.5.
It should work if you download and install the wheel from Unofficial Windows Binaries for Python Extension Packages:
Download the OpenGLContext‑2.3.0‑py2.py3‑none‑any.whl installation file to a an arbitrary directory.
cd to that directory in a command line and install using pip install OpenGLContext‑2.3.0‑py2.py3‑none‑any.whl
It looks like OpenGLContext has not been updated in a while, and thus is not compatible with Python 3.5.
Having a look at https://pypi.python.org/pypi/OpenGLContext yields that the last update was in 2014.
You probably want to either use an older python version, or a different library.

How do I import rubberband after successful installation with pip and pip3?

I'm attempting to use rubberband and coming across errors I haven't seen before, nor know how to resolve.
First, I installed via terminal with both pip and pip3. rubberband appears in pip freeze and pip3 freeze as version 0.2.0.
When I import rubberband the python editor in terminal, the common error is returned:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named rubberband
When I import rubberband the python3 editor in terminal, the unusual error is returned. (This error also appears during import in jupyter notebook):
>>> import rubberband
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rubberband.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/lib/libsndfile.1.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rubberband.cpython-37m-darwin.so
Reason: image not found
I think it is notable that import in python and python3 returns different error messages. From there, I am having trouble troubleshooting.
Thanks in advance!
Edit: Tharun K commented to check the dependencies: librubberband and libsndfile. Below are the error messages returned when attempting to install librubberband. (same errors applied for libsndfile)
$ pip3 install librubberband
ERROR: Could not find a version that satisfies the requirement librubberband (from versions: none)
ERROR: No matching distribution found for librubberband
$ python3 -m pip install "librubberband==1.8"
ERROR: Could not find a version that satisfies the requirement librubberband==1.8 (from versions: none)
ERROR: No matching distribution found for librubberband==1.8
$ python3 -m pip install "librubberband~=1.8"
ERROR: Could not find a version that satisfies the requirement librubberband~=1.8 (from versions: none)
ERROR: No matching distribution found for librubberband~=1.8
Edit 2: Solution from Tharun K "Michael, firstly, I'd mentioned libsamplerate and libsndfil formulae.brew.sh/formula/libsndfile formulae.brew.sh/formula/libsamplerate – Tharun K"
libsamplerate and libsndfil needed to be installed with brew.
You can try the solution:
Source : https://github.com/bmcfee/pyrubberband/issues/18#issuecomment-786515163
Download rubberband library ( folder containing rubberband.exe and libsndfile-1.dll
Go to Windows System Environment and Add the folder to Path
Create System Variable with Variable name "rubberband" and path to the rubberband.exe
Make sure all your relevant users can access the path and the rubberband variable (for me, I had to set it up for the admin account and my local user account). This can be checked by opening cmd and typing "rubberband". If the command works, the library is recognized.
Restart the Program in which you want to access the library (e.g. restart Visual Studio)
The answer to the problem was to install pyrubberband with brew, rather than pip.

No module named 'PyQt5.sip' even if I just installed it

I am using Ubuntu VM and trying to run a GUI script - this is the entire repo and this is the script. Apparently I didn't need to install PyQt5, because it said Requirement already satisfied: pyqt5 in ./.eggs/PyQt5-5.14.2-py3.8-linux-x86_64.egg (5.14.2)
Requirement already satisfied: PyQt5-sip<13,>=12.7 in ./.eggs/PyQt5_sip-12.7.2-py3.8-linux-x86_64.egg (from pyqt5) (12.7.2).
However, when running the script, I got the error:
Traceback (most recent call last):
File "Scripts/CellModellerGUI.py", line 9, in <module>
from PyQt5.QtWidgets import QApplication
ModuleNotFoundError: No module named 'PyQt5.sip'
So I installed it with pip, but I get the exact same error.
I tried pyqt5-sip, too, but "Requirement already satisfied" appeared again.
It's possible that your pip and python are not linked to the same version. Try doing pip --version and python --version and see if the Python versions match (not the pip version, but the Python version it says it's linked to)

sudo install - Python 3?

I'm new to Linux and I'm trying to install packages through a Makefile so users can run my Python 3 program.
sudo pip install python3-weather-api
However, even after uninstalling a previously installed version, the package seems to be going to the 2.7 version of Python.
Requirement already satisfied: python3-weather-api in /usr/local/lib/python2.7/dist-packages
Then, when I run the program, it can't find the module (it works locally in Python 3 just fine).
SystemExit: 1
Traceback (most recent call last):
File "project.py", line 11, in <module>
from weather import Weather
ImportError: No module named 'weather'
Is there a way I can point the original installation so when I run python3 project.py it can find the module?
Thanks very much!
I would recommend you to use pyenv to manage your Python installations, but, for now, try to run:
sudo pip3 install python3-weather-api

How to install module tf0to1 in python3.5 operating system windows 10

I am trying to upgrade vactorized_graph.py using below command which gives me an error
C:\Python35>python tf_upgrade.py --infile vectorized_graph.py --outfile
vectorized_graph_1.py
Traceback (most recent call last):
File "tf_upgrade.py", line 21, in <module>
from tf0to1.core import Tensorflow0To1Transformer
ImportError: No module named 'tf0to1'
and when I try to install module tf0to1, I get below error.
C:\Python35\Scripts>pip3 install tf0to1
Collecting tf0to1
Could not find a version that satisfies the requirement tf0to1 (from
versions: )
No matching distribution found for tf0to1
(I have already installed module redbaron)
Any suggestion?

Categories