Can't install gevent on termux, anyone can help me? - gevent

~ $ pip install gevent
Collecting gevent
Using cached gevent-21.12.0.tar.gz (6.2 MB)
Installing build dependencies ... done Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting zope.event
Using cached zope.event-4.5.0-py2.py3-none-any.whl (6.8 kB)
Requirement already satisfied: setuptools in /data/data/com.termux/files/usr/lib/python3.10/site-packages (from gevent) (58.1.0)
Collecting zope.interface
Using cached zope.interface-5.4.0-cp310-cp310-linux_aarch64.whl
Requirement already satisfied: greenlet<2.0,>=1.1.0 in /data/data/com.termux/files/usr/lib/python3.10/site-packages (from gevent) (1.1.2)
Building wheels for collected packages: gevent
Building wheel for gevent (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for gevent (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [63 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
generating cffi module 'build/temp.linux-aarch64-3.10/gevent.libuv._corecffi.c'
Running '(cd
"/data/data/com.termux/files/usr/tmp/pip-install-55j041qz/gevent_018671f4e2174ad19170736008c5782a/deps/libev" && sh ./configure -C
configure-output.txt )' in /data/data/com.termux/files/usr/tmp/pip-install-55j041qz/gevent_018671f4e2174ad19170736008c5782a
configure: error: no acceptable ld found in $PATH
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in
main()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 230, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 481, in <module>
run_setup(EXT_MODULES)
File "setup.py", line 348, in run_setup
setup(
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/cffi/setuptools_ext.py", line 143, in run
ext.sources[0] = make_mod(self.build_temp, pre_run)
File "/data/data/com.termux/files/usr/tmp/pip-build-env-l1wl_veu/overlay/lib/python3.10/site-packages/cffi/setuptools_ext.py", line 128, in make_mod
pre_run(ext, ffi)
File "/data/data/com.termux/files/usr/tmp/pip-install-55j041qz/gevent_018671f4e2174ad19170736008c5782a/_setuputils.py", line 364, in pre_run
action()
File "/data/data/com.termux/files/usr/tmp/pip-install-55j041qz/gevent_018671f4e2174ad19170736008c5782a/_setuplibev.py", line 55, in configure_libev
system(libev_configure_command)
File "/data/data/com.termux/files/usr/tmp/pip-install-55j041qz/gevent_018671f4e2174ad19170736008c5782a/_setuputils.py", line 195, in system
if _system(cmd, cwd=cwd, env=env, **kwargs):
File "/data/data/com.termux/files/usr/tmp/pip-install-55j041qz/gevent_018671f4e2174ad19170736008c5782a/_setuputils.py", line 191, in _system
return check_call(cmd, cwd=cwd, env=env, **kwargs)
File "/data/data/com.termux/files/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '(cd "/data/data/com.termux/files/usr/tmp/pip-install-55j041qz/gevent_018671f4e2174ad19170736008c5782a/deps/libev" && sh ./configure -C > configure-output.txt )' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for gevent
Failed to build gevent
ERROR: Could not build wheels for gevent, which is required to install pyproject.toml-based projects
~ $

try lower versions
https://pypi.org/project/gevent/#history
I have tried all the versions I see 20.4.0 Is the best

Try:
pkg install binutils
This worked for me.

Related

pip install command creates syntax error : Traceback (most recent call last)

I've been trying to install bs4 and selenium from the windows powershell, and here is the error message I get :
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\commands\install.py", line 326, in run
session = self.get_default_session(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 98, in get_default_session
self._session = self.enter_context(self._build_session(options))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 125, in _build_session
session = PipSession(
^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\network\session.py", line 343, in __init__
self.headers["User-Agent"] = user_agent()
^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\network\session.py", line 175, in user_agent
setuptools_dist = get_default_environment().get_distribution("setuptools")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 188, in get_distribution
return next(matches, None)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 183, in <genexpr>
matches = (
^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\base.py", line 612, in iter_all_distributions
for dist in self._iter_distributions():
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 176, in _iter_distributions
for dist in finder.find_eggs(location):
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 146, in find_eggs
yield from self._find_eggs_in_zip(location)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 123, in _find_eggs_in_zip
from pip._vendor.pkg_resources import find_eggs_in_zip
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3251, in <module>
#_call_aside
^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3277, in _initialize_master_working_set
tuple(
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3278, in <genexpr>
dist.activate(replace=False)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2785, in activate
declare_namespace(pkg)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2284, in declare_namespace
_handle_ns(packageName, path_item)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2217, in _handle_ns
loader.load_module(packageName)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygoogle\google.py", line 113
print """PyGoogle %(__version__)s
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
I cannot install any pip package in my pc it returns that error
pip version is : pip 22.3.1
python version is : Python 3.11.1
Appreciate Your support .
I tried to install any pip package
You've installed a package PyGoogle which is very old (2006) and works only with Python 2. You need to uninstall it:
pip uninstall -y pygoogle
If that doesn't work — remove the directory C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygoogle

Snakemake remote: Keyerrpr

I need to download some file from remote http:
If I use to download bz2 or pdf I have this error:
Traceback (most recent call last):
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/__init__.py", line 522, in snakemake
cluster_status=cluster_status)
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/workflow.py", line 586, in execute
success = scheduler.schedule()
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/scheduler.py", line 283, in schedule
self.run(job)
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/scheduler.py", line 300, in run
error_callback=self._error)
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/executors.py", line 327, in run
job.prepare()
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/jobs.py", line 523, in prepare
self.download_remote_input()
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/jobs.py", line 498, in download_remote_input
f.download_from_remote()
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/io.py", line 270, in download_from_remote
self.remote_object.download()
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/snakemake/remote/HTTP.py", line 162, in download
if not self.name.endswith(".gz") and httpr.headers["Content-Encoding"] == "gzip":
File "/home/ktule/miniconda2/envs/snakemake/lib/python3.6/site-packages/requests/structures.py", line 54, in __getitem__
return self._store[key.lower()][1]
KeyError: 'content-encoding
I use the
snakemake --version
4.6.0
and
from snakemake.remote.HTTP import RemoteProvider as HTTPRemoteProvider
HTTP = HTTPRemoteProvider()
rule all:
input:
HTTP.remote("http://....../tools/2015-10-somatic_variant_calling_and_denovo.pdf", keep_local=True)
output:
"2015-10-somatic_variant_calling_and_denovo.pdf"
run:
shell("mv {input} {output}")

Python 3.4 pyximport error

I have two files named as experiment.py and low_dim_cython.pyx. I am using python 3.4 in PyCharm. In experiment.py, I tried to import low_dim_cython.pyx as:
import numpy
import pyximport
pyximport.install(pyximport.install(setup_args={'include_dirs':[numpy.get_include()]}))
import low_dim_cython
It throws these errors given below.
Traceback (most recent call last):
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\pyximport\pyximport.py", line 216, in load_module
inplace=build_inplace, language_level=language_level)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\pyximport\pyximport.py", line 192, in build_module
reload_support=pyxargs.reload_support)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\Cython\Distutils\old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\Cython\Distutils\old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat

Jupyter does not run with sagemath installed

I am running on a mac, with sagemath installed and Anaconda also.
Sage is working fine, though Jupyter notebook doesn't run.
I get the following error:
Rois-MBP:~ roi$ /anaconda/bin/jupyter_mac.command ; exit;
[W 22:32:09.192 NotebookApp] Unrecognized JSON config file version, assuming version 1
Traceback (most recent call last):
File "/anaconda/bin/jupyter-notebook", line 6, in <module>
sys.exit(notebook.notebookapp.main())
File "//anaconda/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "//anaconda/lib/python3.5/site-packages/traitlets/config/application.py", line 595, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "//anaconda/lib/python3.5/site-packages/traitlets/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "//anaconda/lib/python3.5/site-packages/notebook/notebookapp.py", line 1069, in initialize
self.init_configurables()
File "//anaconda/lib/python3.5/site-packages/notebook/notebookapp.py", line 837, in init_configurables
parent=self,
File "//anaconda/lib/python3.5/site-packages/nb_conda_kernels/manager.py", line 19, in __init__
specs = self.find_kernel_specs() or {}
File "//anaconda/lib/python3.5/site-packages/nb_conda_kernels/manager.py", line 129, in find_kernel_specs
self.conda_info = self._conda_info()
File "//anaconda/lib/python3.5/site-packages/nb_conda_kernels/manager.py", line 29, in _conda_info
p = subprocess.check_output(["conda", "info", "--json"]
File "//anaconda/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "//anaconda/lib/python3.5/subprocess.py", line 693, in run
with Popen(*popenargs, **kwargs) as process:
File "//anaconda/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "//anaconda/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'conda'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Other apps like spyder do run successfully.
Can I solve it somehow?
Found a way to run jupyter notebook through sage:
Just run from the terminal: ./sage -n jupyter

Failed to pip install georasters in MacOSX

It always failed to pip install georasters in my macbook.
The following is the Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 412, in run_egg_info
self.setup_py, self.name,
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 387, in setup_py
import setuptools # noqa
File "build/bdist.macosx-10.12-intel/egg/setuptools/__init__.py", line 12, in <module>
File "build/bdist.macosx-10.12-intel/egg/setuptools/version.py", line 1, in <module>
File "build/bdist.macosx-10.12-intel/egg/pkg_resources/__init__.py", line 72, in <module>
File "build/bdist.macosx-10.12-intel/egg/packaging/requirements.py", line 59, in <module>
TypeError: __call__() takes exactly 2 arguments (1 given)
pip --version:
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7)
After many times trying, I resolved the problem.
I used the command:pip install --no-deps georasters
https://pip.pypa.io/en/stable/reference/pip_install/#installation-order[enter image description here][1]

Resources