FFmpeg installation requiring python uninstallation on Mac - python

Did brew install ffmpeg, installs some packages and gives this error :
Error: python is already installed from !
Please brew uninstall python first."
I have python3.6.5 installed via brew, for using Tensorflow etc. No other python version is installed via brew right now. Why is this error coming up? What version does FFmpeg need?
Earlier I actually uninstalled python and that broke my system in many frustrating ways. I had to delete everything and start over. What is a safer way to get this working?

Related

Pip Errors Out When Installing Anything

I've run into an odd issue where pip just won't work. I'm using the latest version of PyCharm, and I've tried both Python 3.8.10 and 3.9.6.
I've done clean installations of both, removed from PATH, reinstalled with new installer, reinstalled pip, etc.
The error code I run into appears no matter what library I am trying to download. I've tried PyAudio, PyGame, OpenCV-Python and others.
Pip was working fine a couple days ago, and no changes have been made to any files in that time.
Attempting to run pip install --upgrade pip does not have an effect.
I've been running off virtual enviroments with setuptools 40.8.0 and pip 21.1.3 installed.
The full error for installing PyAudio can be seen here: https://pastebin.com/iQmZwsRv
PyGame error: https://pastebin.com/WEF8uM2d
OpenCV-Python Error: https://pastebin.com/LuZq99Cu
Py- audio - it's not compatible with your Py charm I suppose due to the latest install updates, try to install it on the main environment. Also, try to downgrade your version of python as many dependencies are not compatible with your version of python as stated by error[it is not compatible with this Python]
Open Cv - Fails to build the wheel package as it is attributed also in error [CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.]
May I know what build tool are you using?

python3 pip fails to install jupyter on windows 10

I want to install jupyter on Win 10. I have been using python on linux, but this is my first time on Win 10.
when I execute python -m pip install jupyter on administrator, I got errors like this:
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
any idea?
I have been able to get around this error by installing Anaconda, uninstalling Python 3.8.0 and installing Python 3.7.5 instead.
The Jupyter installation then ran successfully when I executed pip install jupyter with Git Bash in my C:\ drive using pip 19.2.3 (the default with Python 3.7.5).
For those who encounter this and need to use Python 3.8+, make sure to update you setuptools to version 42.0.0 (or later).
Install a version earlier than python 3.8 and the installation will work. Use CMD.
I had the same problem, I am using 64-bit windows 10 but downloaded the 32-bit python installer because it is the default that appears on the 'downloads' page on the python.org site. Uninstalled python 3.8.1, downloaded the 64-bit installer instead, and then ran 'pip install jupyterlab' using the pip version 19.2.3 that got installed with the 64-bit python instead of upgrading to pip version 19.3.1. So if you are running a 64-bit version of windows, make sure you download the 64-bit python installer!

Module installation in python returning "Could not find any downloads that satisfy the requirement" error?

Unfortunately I cannot install any modules on python 3.4 32 Bit using the pip command due to the following error.
How do I get around the problem. I have removed all other installations of python and have installed the 32 Bit version rather than the 64 Bit one?
Thanks
Edit 1:
At the moment I can't even upgrade pip
Edit 2
Unfortunately it still returns an error.
Try upgrading your pip with
python -m pip install -U pip
If this fails too, it has to be a network problem. See if you're properly connected to internet.
Seems like you might be using an old version of PIP which is facing SSL certification issues and is hence unable to connect. You can do a manual reinstall of pip using these commands.:
python -m pip uninstall pip setuptools
Then, download this script
Finally, run the script with:
python get-pip.py

How to install Numpy & pip3 for python3.x when they were installed in python2.7? Using Conda?

I want to write program in python3 (3.5), hence I installed python3 next to the pre-installed python2 (2.7) on Mac OS X El Captian.
Since my terminal runs python2.7 by default and Numpy is already installed for it, I put alias python=python3 and expected to be able to install Numpy for python3. when I type pip install numpy. This was the generated message:
Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
I also noticed that I have no pip3 even though I am using python3: python --version returned Python 3.5.2, but pip3 install numpy got me -bash: pip3: command not found.
So my questions are:
1) How to install Numpy for python3.x when Numpy is installed on python2.x?
2) How to get pip3?
3) Is it better to use virtual environments, such as Conda, instead of juggling between python2 and python3 on the system?
Thank you from a total n00b
------------------- Update -------------------
Reinstalling python3 also fixed another problem in my case.
When I ran brew doctor, one of the warning message I got was:
Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run brew link on these: python –
This is a result of me running brew unlink python in order to fix
"Python quit unexpectedly"
when I launch Vim and also
"The ycmd server SHUT DOWN"
Both seem to relate to the YouCompleteMe autocomplete plugin which I downloaded for Python.
I got my idea of removing symlinks from here and here
However, Homebrew evidently did not like the absence of those 39 symlinks.
After uninstall (brew uninstall python3) and then re-install python3 (brew install python3) as Toby suggested, Homebrew gave me
You can install Python packages with
pip3 install <package>
Then when I pip3 install numpy and pip3 install scipy, both executed successfully.
To my surprise, symlinks created during Python installation used to cause aforementioned error messages for Python and YouCompleteMe, but now I open python files using Vim without crash from a fresh Python installation, which definitely created the symlinks.
------------------- Update2 ------------------
After re-installing Anaconda2, the same YouCompleteMe error came back. I suspect Anaconda messed up symlinks.
I would recommend using the Anaconda Python distribution.
The main reasons are as such:
You will have a Python distribution that comes with numpy and the rest of the Scientific Python stack.
The Anaconda Python will be installed under your home directory, with no need for sudo-ing to install other packages.
conda install [put_packagename_here] works alongside pip install [put_packagename_here]; conda install is much 'cleaner' (IMHO, differing opinions are welcome).
If you have a Python 3 environment as your default, then pip works out-of-the-box without needing to remember to do pip3.
conda environments are easier to manage than virtualenv environments, in my opinion. And yes, you can have Python 2 alongside Python 3.
I once messed up my system Python environment - the one that came with my Mac - and it broke iPhoto (back in the day). Since then, I became convinced of needing separate, atomic environments for different projects.
I've detailed more reasons in a personal blog post.
Other distributions, of course, are all good, provided they give you what you need :).
The simplest way on a Mac is with Homebrew:
http://brew.sh/
Install Homebrew, then run:
brew install python3 pip3
Edit --
Python3 includes pip3, but Homebrew occasionally has trouble linking to the correct versions, depending on what has been installed. Running the following command:
brew doctor
And if you see errors relating to python or unlinked kegs, try running:
brew uninstall python python3
And reinstalling after checking brew doctor.
https://unix.stackexchange.com/questions/233519/pip3-linked-to-python-framework-instead-of-homebrew-usr-local-bin

pip install matplotlib fails on mavericks with homebrew

I am trying to install the Scipy python stack, but having issues.
I have a new mac os with mavericks (10.9).
I have installed homebrew and am using brew to manage installations.
I used
% brew install python
then (I verified pip is from my homebrew installation)
% pip install numpy [this works]
% pip install scipy [this works]
% pip install matplotlib OR pip install http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1.tar.gz
Both fail with the same error. After checking the backend, I get
Fatal Python error: PyThreadState_Get: no current thread
The error message from mac os X (the pop up error window) shows errors very similar to those in the previous thread
Homebrew + Python on mac os x 10.8: Fatal Python error: PyThreadState_Get: no current thread importing mapnik
It seems I need to fix the python bindings, as some of them linked against the /System/Library python that ships with the mac. What is not clear to me from the above post is
which of the Binary Images need to be "re-linked"? all of them? some seem quite general an not related to matplotlib
how do I actually use install_name_tool to fix the link? As I mentioned, some seem quite general - do I really want to change the path? Do I cp the dylib from old to new?
I have also tried
brew uninstall python
and re-brewing, all to get the same error. I am trying not to use EPD because EPD installs its own libxml2 and others, which I need for other software I will install, and this has caused me problems on an old machine. I am open to considering a virtualenv, but was hoping to learn to just fix my current problem if possible.
Thanks,
Andre
PS, when pip install matplotlib`, the following warning appears, which seems odd because matplotlib is such a staple piece of software
You are installing an externally hosted file. Future versions of pip will default to disallowing externally hosted files.
You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files.
This is an issue in pygtk. You can test it with brew (it should throw the same error):
brew test pygtk
I ran into the same problem, and got past that error with the following steps from https://github.com/mxcl/homebrew/issues/13654
brew rm py2cairo
brew install py2cairo
You can test that pygtk is working using brew test pygtk again.
I'm still having other problems getting pip install matplotlib to work, so you may also run into more problems, but that should get you past that particular issue.
I had the same problem, and after some experimentation it seems that installing under Python 3 works more reliably. i.e. this installed without error:
pip3 install matplotlib
I then had to re-install everything else using pip3, and make sure I was running under python3 at execution time.
brew install freetype
it works on mac os sierra!

Categories

Resources