LLVM downloads 11 to environment - virtualenv

Best regards
i need to download librosa to raspberry pi so first of all i downloaded virtualenv and created environment and installed llvm with:
sudo apt-get install llvm
pip3 install llvmlite==0.37
pip3 install librosa=0.6.3
then tried to import a librosa in abc.py file. execution output is:
importerror-numpy-core-multiarray-failed-to-import
changing the numpy version didin't help output evolved:
numba 0.55 requires numpy 1.22
tried to change numba version but it didin't help either
anyway...
everyone installed llvm version 7 for librosa but my version is 11. I couldn't find the download with version. I've tried:
sudo apt-get install llvm-7.0
Librosa and numpy does not work well in llvm11.
how can i download version 7?
Thanks for advices

Related

How to install egg file with easy_install?

On a HPC node, I have a file named pysdf-0.1-py3.8-linux-x86_64.egg.
I found a Nvidia Manual to install this file using python -m easy_install pysdf-0.1-py3.8-linux-x86_64.egg.
However, when I run this command I get the following error.
(/scratch/s.1915438/modulus) [s.1915438#sl1 eggs]$ python -m easy_install pysdf-0.1-py3.8-linux-x86_64.egg
/scratch/s.1915438/modulus/bin/python: No module named easy_install
Similarly, if I use pip install as follows
(/scratch/s.1915438/modulus) [s.1915438#sl1 eggs]$ python -m pip install pysdf-0.1-py3.8-linux-x86_64.egg
ERROR: Could not find a version that satisfies the requirement pysdf-0.1-py3.8-linux-x86_64.egg (from versions: none)
ERROR: No matching distribution found for pysdf-0.1-py3.8-linux-x86_64.egg
I do not have admin access on HPC server to use sudo apt. My python is installed at /scratch/s.1915438/modulus/bin/python on the HPC machine.
Does anyone knows why it says Could not find a version that satisfies the requirement.
After 3 months, I figured out how to do this. So, egg files can be installed using something called easy_install which was depreciated back in 2019. The last version of setuptools that supported easy_install was setuptools 42.0.0..
So, you need to downgrade to that version as follows.
pip3 install setuptools==42.0.0
And then install the egg files using the following command.
python3 -m easy_install example.egg
If you wish to upgrade the setuptools to the latest version, then type
pip3 install setuptools --upgrade

python2.7 in Raspbian Lite

I have installed Raspbian Lite OS in Raspberry Pi zero.
I found that Raspbian Lite comes with Python3 as default.
But I am gonna run some scripts that uses libraries that are Python2 Compatible.
So I tried to change the default Python version from Python3 to Python2 (Specifically Python2.7.18)
After so much searching and trying, instructions from [this page][1] made my job
Now if I try to check in command writing
python --version
It shows me that it is Python2.7.18
But the problem is I am not being able to install any packages using
sudo apt-get install <python-packagename>
It shows me Errors like
1.Package "python-pip" has no installation candidate (When I tried to install pip)
2. Package python-numpy has no installation candidate (when I tried to install numpy)
3. unable to locate package python-pyaudio (when I tried to install pyaudio)
I am searching but no solution.
Can anyone please help? I am frozen in a critical stage of my project .
Generally, for new raspbian/raspios os with python 3 by default, it is not suggested to replace the system python interpreter to python 2, it may break some system component's dependency.
Instead, you can create a python 2 virtual env, if you need to run python2 scripts.
sudo apt-get install python3-pip
pip install virtualenv
virtualenv -p /usr/bin/python2.7 venv
source venv/bin/activate
You can test the python version as following,
(venv) $ python --version

How to install TensorFlow on Python 3.7

How to install TensorFlow on Python 3.7
Trying:
D:\Users\Downloads>pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
Windows 10 OS
And with vent error, too
(venv) C:\Users\KvaksManYT>pip install --upgrade tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
I would recommend using a virtual environment using pip install vitualenv. Then, depending on your OS, you want to create and activate an environment.
python3 -m venv /path/to/new/virtual/environment
Then, activate this environment using,
source ./venv/bin/activate
Now, you can install any Python packages you want.
pip install tensorflow==2.0.0
you can install Tensorflow follow those steps
Ubuntu/Linux /mac os /windows
virtualenv does not require a mention pip version
for system install, you need to mention pip version
upgrade pip version
pip install --upgrade pip
#virtualenv install
pip install --upgrade tensorflow
#system install
pip3 install --user --upgrade tensorflow
reference https://www.tensorflow.org/install/pip
I had the same problem with Windows 10 x64, and it was caused because I was using the wrong Python version, both globally and in the venv. I found questions on the issue multiple times on the internet, including yours.
Be sure to use Python versions 3.5-3.8, as per requirements, but also x64, not x32.
Namely, I ran into this error using both
a venv with 3.9.1 x64 (python --version),
and my globally installed 3.8.2 x32 (python3 --version).
So, I downloaded the x64-version of Python 3.8.6 from here.
Note that the command venv does not allow specifying the python version used in the virtual environment,
as per an answer on this question. So I used virtualenv, which I obviously had to install in my global Python version first.
To specify the Python version used in the venv, I used the command virtualenv, as in:
virtualenv --python="C:\Users\me\AppData\Local\Programs\Python\Python38\python.exe myvenv
where you have to give the path to the newly downloaded Python distribution you want to use, if there are several on your PC (for example, I had Python38-32 and Python39 folders in that directory).
Check Python versions in virtual environment
After I activate my myvenv, created as above, I verify the Python versions as follows:
python3 --version
> Python 3.8.2
python --version
> Python 3.8.6
Then, using the command
import struct
print(struct.calcsize("P") * 8)
Within either python3 or python, shows me whether the version is 32bit or 64bit, as per this answer. The python returns a 64, so that is the one you want to use (not python3).
Finally, within the virtual environment, you can run
pip install --upgrade tensorflow
and it will download and install. (Meanwhile, pip3 install --upgrade tensorflow would still return your error inside and outside the virtual enviroment.)

Erro install paramiko on raspberrypi

When I install paramiko on raspberypi , have this problem:
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.25' not found
Have you try to upgrade your libc6 package?
sudo apt-get update
sudo apt-get install libc6
From: How to fix “/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found”?
That means the program was compiled against glibc version 2.14, and it requires that version to run, but your system has an older version installed. You'll need to either recompile the program against the version of glibc that's on your system, or install a newer version of glibc (the "libc6" package in Debian).
Finally,I solve the problem by the root.Upgrade Raspbian Stretch to Raspbian Buster.
https://pimylifeup.com/upgrade-raspbian-stretch-to-raspbian-buster/

Why can't I get `pip install lxml` to work within a virtualenv on raspberry pi

It keeps freezing or gives me the
'arm-linux-gnueabihf-gcc': error.
One option is to just use the packaged versions of the lxml module.
If you're on Python 3:
apt-get install python3-lxml
Or on Python 2:
apt-get install python-lxml
If you create your virtualenv with --system-site-packages, you will have access to this install of lxml from the virtualenv.
I'm running Raspbian Stretch on my Pi, and it looks like pip install grabs a binary build (so no gcc required):
(venv) pi#lbb:~ $ pip install lxml
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting lxml
ww Downloading https://www.piwheels.org/simple/lxml/lxml-4.2.1-cp35-cp35m-linux_armv7l.whl (4.9MB)
100% |████████████████████████████████| 4.9MB 1.0MB/s
Installing collected packages: lxml
Successfully installed lxml-4.2.1
Are you running the same distribution on your Pi? If not, please update your question to include that information.