Unable to install bazel 0.4.5 in MacOS 10.13 - python-3.x

I have macOS 10.13
bazel version 0.15.2-homebrew
I am trying to install bazel 0.4.5 to be able to finish my tensorflow GPU support installation. there is a problem where I have to have bazel 0.4.5 instead 0.15.2 (what a pain)
I have downloaded the binary file bazel-0.4.5-installer-darwin-x86_64.sh
I ran chmod +x bazel-0.4.5-installer-darwin-x86_64.sh
then ./bazel-0.4.5-installer-darwin-x86_64.sh --user
when running the installation i get following error
Uncompressing......
/Users/jvivas/.bazelrc already exists, moving it to /Users/jvivas/.bazelrc.bak.
Problem with java installation: couldn't find/access rt.jar in
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
looks like I can not run bazel 0.4.5 with JDK 10..here is where I dont know what do...may be I have to downgrade the JDK to 8 or 9, which it seems there was another problem with it.
Have anyone ran into this issue before?
Thanks

Related

How to install paddleOCR (CPU version) for CentOS 7?

I have been trying to install paddleOCR CPU version for centos7. While running the program file, I encountered an error given below.
Error
First, we installed virtual environment with python version 3.8.1 followed by the commands given below-
I tried-
pip install paddlepaddle
pip install paddleocr
Is there any way to properly install the library? or how to solve this error?

Unable to Install Jupyter due to legacy-install-error with psutil package

I was previously running into environment inconsistencies after downloading tensorflow with pip in a conda environment, and after several hours of frustration, decided deleting anaconda/miniconda and python and starting from scratch would be my best option to get python working again (The inconsistencies were causing a plethora of issues with loading other modules like numpy, etc).
After downloading Python version 3.9.10 directly from https://www.python.org/downloads/macos/, I wanted to see if I could start using Python again in a Jupyter notebook in VS Code. When I try to run a simple print('hello world') in a python chunk I (unsurprisingly) get the following error:
Jupyter cannot be started. Error attempting to locate jupyter: Running cells with 'Python 3.9.10 64-bit' requires notebook package.
Run the following command to install 'jupyter and notebook' into the Python environment.
Command: 'python -m pip install jupyter notebook -U'
I was pretty much expecting this error, since I knew I had deleted all packages when deleting Anaconda and Python.
However, when I try running python -m pip install jupyter notebook -U in the terminal I ultimately get the following error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> psutil
note: This is an issue with the package mentioned above, not pip.
Any help or insight is greatly appreciated! I am on MacOS (M1) if that is useful information.
The problem seems to be with the python3 distribution that comes with MacOSX Command Line Tools. Well, at least that same error was gone after following these steps.
So, to fix the problem I installed python3.9 (I presume you can change 3.9 to your desired version, e.g. 3.8 or 3.10) using Homebrew.
Install Homebrew (to check if it's installed already just type brew --version in the terminal):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install python3.9
brew install python#3.9
Create your virtual environment
python3.9 -m venv myvenv
Activate the virtual environment with source myvenv/bin/activate
Finally, install Jupyter using
(myvenv) pip install jupyter notebook
I have the same problem when installing the Jupyter notebook on MacOS 12.5 M2 chip. It turns out that the error is caused by not having GCC on my mac to run the wheel for installing the psutil package because for some reason I removed my XCode from my Mac. So I installed XCode from AppStore and opened XCode after the installation to agree to its terms and conditions. After Xcode went through the setup process I tried pip install jupyter again and it worked well.
In my case, I just opened the XCode, accept the terms and the installation proposed, and tried to install the jupyter again and it worked!
It seems to be very particular about the version of python installed. I set up a fresh installation on a new box this morning and put 3.11 on there. pip install jupyterlabs gave me the same error as you got. I then uninstalled python and installed an earlier version, and now it works.
PS the older version that worked for me is 3.10.8

Could not find a version that satisfies the requirement MetaTrader5

I am trying to install a python package MetaTrader5 using the command
python3 -m pip install MetaTrader5
and I have even tried
pip install MetaTrader5
But it throws the following error
ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)
ERROR: No matching distribution found for MetaTrader5
I am using
Ubuntu 16.04.6
Python 3.6.10
can someone help with this?
I have a mac. On it I have conda installed on MacOS. In addition I have a virtual machine running windows and I have also installed conda on Windows. I could install MetaTrader5 package using pip on the virtual machine but not on MacOS.
According to this Youtube video, MetaTrader5 currently doesn't support Ubuntu. It's only available on Windows.
If you look at Pypy and view the wheel files, you will see that all the builds are for Windows. pip is refusing to install because it can't find a Mac or Linux version.
https://pypi.org/project/MetaTrader5/5.0.37/#files
Download python version 3.10.0 then try installing metatrader5.
here the link: https://www.python.org/downloads/release/python-3100/
Metatrader 5 for Python, only work in exact versions:
Install one of version below to MT5 works.
Python Versions for Metatrader5

ERROR in install opencv in my python 3.6.6

I HAVE PYTHON 3.6.6 INSTALLED IN MY WINDOWS 7 PLATFORM BUT WHEN I TRIED TO INSTALL OPENCV PACKAGE IT SAYS REQUIREMENT ALREADY SATISFIED AND IF I TRY TO IMPORT CV2 IT SAYS NO MODULE .I'VE TRIED ALL POSSIBLE METHODS ON INTERNET WHAT SHOULD I DO
i tried to download opencv exe from sourceforge and copying cv2.pyd file and then pasting it in site packages
i tried pip install opencv_python-4.0.1-cp37-cp37m-win_amd64.whl
but nothing works
The error message says that you are asking PIP install a version of cv2 for 64-bit Python 2.7, and that installation is failing. So the installation is not happening because it's the wrong version. That might be because you don't have Python 2.7, or because you have a 32-bit processor, or both. Navigate to Python36\Scripts and issue the command pip install opencv_python. Then pip will find the appropriate file to download, and install it.

Installing OpenCV for Python in Ubuntu 12.04. No module present in dist-packages or site-packages?

Following the steps given here, i have completed the installation process, however Python (IDLE) is giving me an ImportError. For which the guide suggests :
Python may return to you an error like "No module named cv" The trouble is that the python module is installed in /usr/local/lib/python2.6/site-packages. But, on Debian and on Ubuntu, Python only looks in /usr/local/lib/python2.6/dist-packages
You can fix it using three ways (Use only one of those, the first is the best):
move the cv.so file from the site-packages to the dist-packages:
sudo mv /usr/local/lib/python2.6/site-packages/cv.so /usr/local/lib/python2.6/dist-packages/cv.so
However, both the site-packages as well as dist-packages, for both 2.7 and 3.2 are empty.
What went wrong and how do i solve it ?
I solved the problem by installing all the packages and dependencies again using the Software Center. OpenCV Python bindings are available for OpenCV 2.3 and Python 2.7 directly from the software center which I used the second time.
OpenCv python bindings for 3.2 are not available for 12.04. They are being developed for Raring (Ubuntu 13.04) only. Hence, the solution is to use either backports, or to use OpenCv on Python 2.7
Backports also have a problem as they are available only for 32 bit OS systems and not 64 bit.
So, the only safe and stable way to run OpenCV Python on Ubuntu seems to be using OpenCV 2.3 on Python 2.7
I also get the empty dist-packages folder with OpenCV2.4.4 and Ubuntu 12.04. It turns out that I need to install python-dev and python-numpy in order to make the cv.so compiled into the dist-packages.
sudo apt-get install python-dev python-numpy
After that, using cmake to build OpenCV again and everything will be fine
UPDATE
it depends on your system pretty much.
On my Lion (10.8), I have java installed, and openCV complaints about cannot build the unit test and stop at 92%. It turned out that I have to manually create the build folder and put the junit jar into the lib folder in order to let opencv compile all the test case. After that, everything is ok
On my ubuntu (12.04, fresh installation with build-essential and all packages are up-to-date), eveything is compiled fine, except that "No module named cv" and there is not cv.so in the dist-packages and site-packages. Searching around and then finally, it turned out that I have to have python-dev and python-numpy

Resources