I'm intermediate in python and I started learning about ML. I use qpython3 app on my android phone and as I need to use some packages such as numpy, I have to install them.
when I run the command
pip install numpy
I get an error that says that my
python version needs to be updated.
I tried many other compilers that run python 3.9 but still can't install libraries.
In Pydroid app, it requires to install an additional plugin app but I can never install it and many others have the same problem as me.
Collecting scipy
Downloading scipy-1.9.3.tar.gz (42.1 MB)
━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 MB 1.8 MB/s eta 0:00:00ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/data/data/ru.iiec.pydroid3/cache/pip-unpack-ddqhn5z9/scipy-1.9.3.tar.gz'
that's the error message
I think if I find a way to install python 3.9 and run it on qpython3 it'll work
Related
I was installing firebase-admin using pip on my raspberry pi 3b+ using the following command:
pip3 install firebase-admin
However it always ends with an error saying "Error building wheel for cryptography"
Here is the full error message:
/tmp/pip-build-env-k7qo7p54/overlay/lib/python3.7/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'cryptography.hazmat.bindings._rust' as data is deprecated, please list it in packages.
!!
############################
# Package would be ignored #
############################
Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
but it is not listed in the `packages` configuration of setuptools.
'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
because it may contain data files, but this behavior is likely to change
in future versions of setuptools (and therefore is considered deprecated).
Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
the `packages` configuration field or the proper discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" and "data files" on setuptools
documentation page.
!!
check.warn(importable)
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation/ for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq/
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation/#rust
Python: 3.7.3
platform: Linux-5.10.103-v7+-armv7l-with-debian-10.13
pip: n/a
setuptools: 67.0.0
setuptools_rust: 1.5.2
rustc: n/a
=============================DEBUG ASSISTANCE=============================
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
This package requires Rust >=1.48.0.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
I have tried different commands like:
pip3 install firebase-admin
or
python -m pip install firebase-admin
I have upgraded pip and tried again, but still it didn't work
I faced a similar problem long time ago and solved by installing openssl. Tried it this time, it didn't work
Also tried installing rust compiler and using it but it didn't work
I am using Raspbian OS Buster on my Raspberry Pi 3
I have tried fresh installs of the OS
Still the same problem occurs
I want to install Tensorflow v1.12.0 on a Docker-container which is running on a Raspberry Pi 3 B Plus using a Dockerfile from python:3.6-slim.
I am aware that i need to take into account that im using an armv7l architecture.
So far I tried installing with pip/pip3 with and without information about version and with and without the use of my requirements.txt.
This way all other needed packages can be installed with pip.
But I am getting the Error:
Step 5/13 : RUN pip install tensorflow==1.12.0
---> Running in d0ecb01c7fbc
Collecting tensorflow==1.12.0
Could not find a version that satisfies the requirement tensorflow==1.12.0 (from versions: )
No matching distribution found for tensorflow==1.12.0
The command '/bin/bash -c pip install tensorflow==1.12.0' returned a non-zero code: 1
Then I tried installing with the armv7l miniconda. But it seems the Tensorflow package is not supported with that version of miniconda.
Lastly I tried installing from a precompiled wheel for arm from this repo: https://github.com/lhelontra/tensorflow-on-arm/releases.
Like so: RUN pip install https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.12.0/tensorflow-1.12.0-cp35-none-linux_armv7l.whl
Here I changed to python:3.5-slim which starts out fine but seems to stop somewhere and results in a broken pipe (I am doing this remote).
I dont know what I could try next and didn't find anything else online.
After installing Python 3.5.1 on Windows 10 x64, cpplint installed from pip produces the error: failed to create process. There seems to be a possibly related issue with pip related to having a space in the path, which exists in my use case. It seems to be related to how the exe is created. How can this error be remedied? Reinstalling Python and cpplint does not solve the problem.
C:\Users>python -V
Python 3.5.1
C:\Users>pip list
pip (7.1.2)
setuptools (18.2)
C:\Users>pip -V
pip 7.1.2 from c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages (python 3.5)
C:\Users>pip install cpplint
Collecting cpplint
Using cached cpplint-0.0.6.tar.gz
Installing collected packages: cpplint
Running setup.py install for cpplint
Successfully installed cpplint-0.0.6
C:\Users>where.exe cpplint
C:\Users\John Hagen\AppData\Local\Programs\Python\Python35\Scripts\cpplint.exe
C:\Users>cpplint
failed to create process.
Yep, this is a pip bug.
The workaround is to add quotes around the path in the first line of generated python scripts in the \Scripts\ directory. In the case of cpplint this is 'cpplint-script.py'. In your case the generated first line should something like:
#!c:\users\john hagen\appdata\local\programs\python\python35\python.exe
and should be edited to:
#!"c:\users\john hagen\appdata\local\programs\python\python35\python.exe"
I have been trying to install numpy using pip on Windows.
But it doesn't seem to be working.
I tried installing numpy and t told me that microsoft C++ package is missing and asked me to install it. I did that and tried re-installing numpy. But this time it doesn't seems to work. It doesn't seem to forward after this point
C:\Users\neil>pip install numpy
Collecting numpy
Using cached numpy-1.9.1.tar.gz
Running from numpy source directory.
Installing collected packages: numpy
Running setup.py install for numpy
Then I tried installing scipy, even that doesn't seem to move forward after this point.
C:\Users\neil>pip install scipy
Collecting scipy
Downloading scipy-0.14.1.tar.gz (10.9MB)
100% |################################| 10.9MB 284kB/s ta 0:00:01
You could use Anaconda. Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes over 195 of the most popular Python packages for science, math, engineering, data analysis (including numpy and scipy).
After downloading the Anaconda installer, double click on the installer application icon and run it.
Follow the instructions in the installer.
The installer is also capable of running in silent mode, without bringing up the graphical interface. To install Anaconda, type the following command into a command prompt:
> Anaconda-2.x.x-Windows-x86[_64].exe /S /D=C:\Anaconda
Good luck.
I am just starting with virtualenv, but I am trying to install gevent within a virtualenv environment (I am running Windows). When I use PIP from virtualenv, I get this error:
MyEnv>pip install gevent
Downloading/unpacking gevent
Running setup.py egg_info for package gevent
Please provide path to libevent source with --libevent DIR
The package index has MSIs and EXEs for installing on Windows (http://pypi.python.org/pypi/gevent/0.13.7), but I don't know how to install those into a virtualenv environment (or if that is even possible). When I try pip install gevent-0.13.7.win32-py2.7.exe from the virtualenv promp, I get an error as well:
ValueError: ('Expected version spec in', 'D:\\Downloads\\gevent-0.13.7.win32-py2.7.exe', 'at', ':\\Downloads\\gevent-0.13.7.win32-py2.7.exe')
Does someone know how to do this?
Pip doesn't support installing binary packages, yet. If you want to install from binary package you have to use easy_install - easy_install gevent-0.13.7.win32-py2.7.exe
Microsoft Windows XP [Wersja 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
Z:\>virtualenv z:\venv\gevent-install
New python executable in z:\venv\gevent-install\Scripts\python.exe
Installing distribute..................................................................................................
............................................................................................done.
Installing pip.................done.
Z:\>venv\gevent-install\Scripts\activate
(gevent-install) Z:\>easy_install c:\python\packages\gevent-0.13.7.win32-py2.7.exe
Processing gevent-0.13.7.win32-py2.7.exe
creating 'c:\docume~1\pdobro~1\ustawi~1\temp\easy_install-b5nj3i\gevent-0.13.7-py2.7-win32.egg' and adding 'c:\docume~1
pdobro~1\ustawi~1\temp\easy_install-b5nj3i\gevent-0.13.7-py2.7-win32.egg.tmp' to it
creating z:\venv\gevent-install\lib\site-packages\gevent-0.13.7-py2.7-win32.egg
Extracting gevent-0.13.7-py2.7-win32.egg to z:\venv\gevent-install\lib\site-packages
Adding gevent 0.13.7 to easy-install.pth file
Installed z:\venv\gevent-install\lib\site-packages\gevent-0.13.7-py2.7-win32.egg
Processing dependencies for gevent==0.13.7
Searching for greenlet
Reading http://pypi.python.org/simple/greenlet/
Reading http://bitbucket.org/ambroff/greenlet
Reading https://github.com/python-greenlet/greenlet
Best match: greenlet 0.3.4
Downloading http://pypi.python.org/packages/2.7/g/greenlet/greenlet-0.3.4-py2.7-win32.egg#md5=9941aa246358c586bb274812e
130629
Processing greenlet-0.3.4-py2.7-win32.egg
creating z:\venv\gevent-install\lib\site-packages\greenlet-0.3.4-py2.7-win32.egg
Extracting greenlet-0.3.4-py2.7-win32.egg to z:\venv\gevent-install\lib\site-packages
Adding greenlet 0.3.4 to easy-install.pth file
Installed z:\venv\gevent-install\lib\site-packages\greenlet-0.3.4-py2.7-win32.egg
Finished processing dependencies for gevent==0.13.7
(gevent-install) Z:\>
See Can I install Python windows packages into virtualenvs? Another option is to install from source and you can do this with pip but this requires setting up compiler and environment which is much harder than the simple command above.
From the error message, it would appear you need libevent source code. I would imagine you need to go a step further and compile/install libevent system-wide so pip can find it.
I would start by downloading the latest stable source from http://libevent.org/.
Compile and install it using instructions in the README: https://github.com/libevent/libevent#readme
To compile it on Windows, you'll need to use GNU-style build utilities like make and autoconf. I recommend http://www.mingw.org/.
Once you've installed libevent system-wide, I imagine pip will find it and proceed with gevent installation.
In the msi for gevent-0.13.7 there's an option to select an alternate installation point. point it to the root dir of your particular virtual environment (just above where /Lib and /Scripts are located). That should install it correctly.
You also need to make sure greenlets are installed. For that you can use Piotr's suggested method with easy_install on the .exe.