can't install any package with pip - python

I'm using ArtixLinux as OS.
I can't use pip for installing package with pip.
I got this error:
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 341, in run
requirement_set = resolver.resolve(
File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
result = self._result = resolver.resolve(
File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 454, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 319, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 176, in _merge_into_criterion
crit = Criterion.from_requirement(self._p, requirement, parent)
File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 79, in from_requirement
matches = provider.find_matches(requirements=[requirement])
TypeError: PipProvider.find_matches() missing 2 required positional arguments: 'identifier' and 'incompatibilities'
I tried reinstall python-pip and python-resolvelib to see if the error solved but no!!
but I can use pip inside a venv, no errors for download or installing any package except PyGObject.
I got this error when trying to install PyGObject inside venv:
Collecting PyGObject
Using cached PyGObject-3.42.1.tar.gz (718 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pycairo>=1.16.0
Using cached pycairo-1.21.0-cp310-cp310-linux_x86_64.whl
Building wheels for collected packages: PyGObject
Building wheel for PyGObject (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for PyGObject (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [42 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/pygtkcompat
copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-cpython-310/pygtkcompat
copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-cpython-310/pygtkcompat
copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-cpython-310/pygtkcompat
creating build/lib.linux-x86_64-cpython-310/gi
copying gi/types.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/pygtkcompat.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/module.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/importer.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/docstring.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/_signalhelper.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/_propertyhelper.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/_ossighelper.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/_option.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/_gtktemplate.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/_error.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/_constants.py -> build/lib.linux-x86_64-cpython-310/gi
copying gi/__init__.py -> build/lib.linux-x86_64-cpython-310/gi
creating build/lib.linux-x86_64-cpython-310/gi/repository
copying gi/repository/__init__.py -> build/lib.linux-x86_64-cpython-310/gi/repository
creating build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/__init__.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/Pango.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/Gio.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/GObject.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/GLib.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
running build_ext
Package gobject-introspection-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gobject-introspection-1.0', required by 'virtual:world', not found
Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.56.0')' 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 PyGObject
Failed to build PyGObject
ERROR: Could not build wheels for PyGObject, which is required to install pyproject.toml-based projects

i am on artix to and have been following this thread bc i had the exact same problems. seems like a package problem
do a -Syu (maybe a reboot.) then redo your original task.
my pip works now.

Related

I am unable to install wordcloud getting the below error. my pip is updated and python version is 3.9 please help. Also I installed visual builder

Building wheel for wordcloud (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_version.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_init_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_main_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
running build_ext
building 'wordcloud.query_integral_image' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for wordcloud
Running setup.py clean for wordcloud
Failed to build wordcloud
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
error: subprocess-exited-with-error
× Running setup.py install for wordcloud did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_version.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_init_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_main_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
running build_ext
building 'wordcloud.query_integral_image' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
[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.
╰─> wordcloud
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

FASTECDSA : Module Not FoundError

when i try to run a python script it throws me "ModuleNotFoundError: No module named "fastecdsa" error and when i try to install fastecdsa it throws me this
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for fastecdsa, since package 'wheel' is not installed.
Installing collected packages: fastecdsa
Running setup.py install for fastecdsa ... error
error: subprocess-exited-with-error
× Running setup.py install for fastecdsa did not run successfully.
│ exit code: 1
╰─> [41 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win32-3.10
creating build\lib.win32-3.10\fastecdsa
copying fastecdsa\benchmark.py -> build\lib.win32-3.10\fastecdsa
copying fastecdsa\curve.py -> build\lib.win32-3.10\fastecdsa
copying fastecdsa\ecdsa.py -> build\lib.win32-3.10\fastecdsa
copying fastecdsa\keys.py -> build\lib.win32-3.10\fastecdsa
copying fastecdsa\point.py -> build\lib.win32-3.10\fastecdsa
copying fastecdsa\util.py -> build\lib.win32-3.10\fastecdsa
copying fastecdsa_init_.py -> build\lib.win32-3.10\fastecdsa
creating build\lib.win32-3.10\fastecdsa\encoding
copying fastecdsa\encoding\asn1.py -> build\lib.win32-3.10\fastecdsa\encoding
copying fastecdsa\encoding\der.py -> build\lib.win32-3.10\fastecdsa\encoding
copying fastecdsa\encoding\pem.py -> build\lib.win32-3.10\fastecdsa\encoding
copying fastecdsa\encoding\sec1.py -> build\lib.win32-3.10\fastecdsa\encoding
copying fastecdsa\encoding\util.py -> build\lib.win32-3.10\fastecdsa\encoding
copying fastecdsa\encoding_init_.py -> build\lib.win32-3.10\fastecdsa\encoding
creating build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_brainpool_ecdh.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_keygen.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_key_export_import.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_key_recovery.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_nonce_generation.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_p256_ecdsa.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_point.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_prehashed.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_prime_field_curve_math.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_rfc6979_ecdsa.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_whitespace_parsing.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests\test_whycheproof_vectors.py -> build\lib.win32-3.10\fastecdsa\tests
copying fastecdsa\tests_init_.py -> build\lib.win32-3.10\fastecdsa\tests
creating build\lib.win32-3.10\fastecdsa\tests\encoding
copying fastecdsa\tests\encoding\test_der.py -> build\lib.win32-3.10\fastecdsa\tests\encoding
copying fastecdsa\tests\encoding\test_sec1.py -> build\lib.win32-3.10\fastecdsa\tests\encoding
copying fastecdsa\tests\encoding_init_.py -> build\lib.win32-3.10\fastecdsa\tests\encoding
running build_ext
building 'fastecdsa.curvemath' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[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.
╰─> fastecdsa
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
my attempt to import the fastecdsa module is because i have written a script that creates many Divided Pubkeys with the bit reduction specified
the division is achieved using the modular inverse of the scalar at least 1 of the output pubkeys with have the reduced bit range specified in the argument how do i resolve this..?
As the error says, that pip modules requires Microsoft Visual C++ 14.0 or greater.
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": visualstudio.microsoft.com/visual-cpp-build-tools [end of output]
Install here: Visual C++

"The filename or extension is too long" while installing confluent-kafka?

I have some trouble installing confluent-kafka by using "pip install confluent-kafka". But I got this error: "The filename or extension is too long." Details are below.
Collecting confluent-kafka
Using cached confluent-kafka-1.8.2.tar.gz (104 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: confluent-kafka
Building wheel for confluent-kafka (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\deserializing_consumer.py -> build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\error.py -> build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\serializing_producer.py -> build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka
creating build\lib.win-amd64-3.10\confluent_kafka\admin
copying src\confluent_kafka\admin\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\admin
creating build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\cached_schema_registry_client.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\error.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\load.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
creating build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\verifiable_client.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\verifiable_consumer.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\verifiable_producer.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
creating build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\avro.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\error.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\json_schema.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\protobuf.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\schema_registry_client.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
creating build\lib.win-amd64-3.10\confluent_kafka\serialization
copying src\confluent_kafka\serialization\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\serialization
creating build\lib.win-amd64-3.10\confluent_kafka\avro\serializer
copying src\confluent_kafka\avro\serializer\message_serializer.py -> build\lib.win-amd64-3.10\confluent_kafka\avro\serializer
copying src\confluent_kafka\avro\serializer\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\avro\serializer
running build_ext
building 'confluent_kafka.cimpl' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\Users
creating build\temp.win-amd64-3.10\Release\Users\Among
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040\src
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040\src\confluent_kafka
error: could not create 'build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040\src\confluent_kafka': The filename or extension is too long
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for confluent-kafka
Running setup.py clean for confluent-kafka
Failed to build confluent-kafka
Installing collected packages: confluent-kafka
Running setup.py install for confluent-kafka ... error
error: subprocess-exited-with-error
× Running setup.py install for confluent-kafka did not run successfully.
│ exit code: 1
╰─> [50 lines of output]
running install
C:\Users\Among\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\deserializing_consumer.py -> build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\error.py -> build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\serializing_producer.py -> build\lib.win-amd64-3.10\confluent_kafka
copying src\confluent_kafka\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka
creating build\lib.win-amd64-3.10\confluent_kafka\admin
copying src\confluent_kafka\admin\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\admin
creating build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\cached_schema_registry_client.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\error.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\load.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
copying src\confluent_kafka\avro\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\avro
creating build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\verifiable_client.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\verifiable_consumer.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\verifiable_producer.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
copying src\confluent_kafka\kafkatest\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\kafkatest
creating build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\avro.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\error.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\json_schema.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\protobuf.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\schema_registry_client.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
copying src\confluent_kafka\schema_registry\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\schema_registry
creating build\lib.win-amd64-3.10\confluent_kafka\serialization
copying src\confluent_kafka\serialization\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\serialization
creating build\lib.win-amd64-3.10\confluent_kafka\avro\serializer
copying src\confluent_kafka\avro\serializer\message_serializer.py -> build\lib.win-amd64-3.10\confluent_kafka\avro\serializer
copying src\confluent_kafka\avro\serializer\__init__.py -> build\lib.win-amd64-3.10\confluent_kafka\avro\serializer
running build_ext
building 'confluent_kafka.cimpl' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\Users
creating build\temp.win-amd64-3.10\Release\Users\Among
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040\src
creating build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040\src\confluent_kafka
error: could not create 'build\temp.win-amd64-3.10\Release\Users\Among\AppData\Local\Temp\pip-install-e4mpsn3s\confluent-kafka_a53471ea97464e83aa35d4164a2c7040\src\confluent_kafka': The filename or extension is too long
[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.
╰─> confluent-kafka
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I tried to use other method in this link "https://github.com/confluentinc/confluent-kafka-python/issues/1002". But it also doesn't work.
Please help me!!
Windows versions lower than 1607 have limitations in place for maximum length for a path (set by MAX_PATH), which restricts file paths' lengths to be capped at 260 characters.
Fortunately, if you are running Windows 10 version 1607, you can enable support for long paths:
Click Win+R
Type regedit and press Enter
Go to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Edit or create a key named LongPathsEnabled (type: REG_DWORD)
Enter 1 as its value and press OK.
Restart your system and try again. It should work now.
Read more: Maximum Path Length Limitation in Windows

Python: kivy installation error, not a git repository

Hy to everybody,
I have installed on my PC (Windows 10 Pro - 64 bit) Python, version 3.8.2 - 64 bit. Now, I want to try to create a GUI, using kivy, because it seems is good and it is open source. So, I'm trying to install it, and I'm following the official guide, on https://kivy.org/doc/stable/installation/installation-windows.html#install-win-dist. I'm at step 3, and previous steps were successful. Now, I have to digit the command:
python -m pip install kivy==1.11.1
But it not works, and the prompt, that I'm using to install kivy, return the following list of error:
Collecting kivy==1.11.1
Using cached Kivy-1.11.1.tar.gz (23.6 MB)
ERROR: Command errored out with exit status 1:
command: 'D:\Python\Orbit_Project\kivy_venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marco\\Tools\\AppData\\Local\\Temp\\pip-install-qbyepev_\\kivy\\setup.py'"'"'; __file__='"'"'C:\\Users\\marco\\Tools\\AppData\\Local\\Temp\\pip-install-qbyepev_\\kivy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\marco\Tools\AppData\Local\Temp\pip-install-qbyepev_\kivy\pip-egg-info'
cwd: C:\Users\marco\Tools\AppData\Local\Temp\pip-install-qbyepev_\kivy\
Complete output (395 lines):
fatal: not a git repository (or any of the parent directories): .git
ERROR: Command errored out with exit status 1:
command: 'D:\Python\Orbit_Project\kivy_venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marco\\Tools\\AppData\\Local\\Temp\\pip-wheel-ac_830t1\\cython\\setup.py'"'"'; __file__='"'"'C:\\Users\\marco\\Tools\\AppData\\Local\\Temp\\pip-wheel-ac_830t1\\cython\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\marco\Tools\AppData\Local\Temp\pip-wheel-kukk6vm2'
cwd: C:\Users\marco\Tools\AppData\Local\Temp\pip-wheel-ac_830t1\cython\
Complete output (321 lines):
Unable to find pgen, not compiling formal grammar.
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying cython.py -> build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\Cython
copying Cython\CodeWriter.py -> build\lib.win-amd64-3.8\Cython
copying Cython\Coverage.py -> build\lib.win-amd64-3.8\Cython
copying Cython\Debugging.py -> build\lib.win-amd64-3.8\Cython
copying Cython\Shadow.py -> build\lib.win-amd64-3.8\Cython
copying Cython\StringIOTree.py -> build\lib.win-amd64-3.8\Cython
copying Cython\TestUtils.py -> build\lib.win-amd64-3.8\Cython
copying Cython\Utils.py -> build\lib.win-amd64-3.8\Cython
copying Cython\__init__.py -> build\lib.win-amd64-3.8\Cython
creating build\lib.win-amd64-3.8\Cython\Build
copying Cython\Build\BuildExecutable.py -> build\lib.win-amd64-3.8\Cython\Build
....
copying Cython\Includes\cpython\pythread.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\ref.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\sequence.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\set.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\slice.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\string.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\tuple.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\type.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\unicode.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\version.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\weakref.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
copying Cython\Includes\cpython\__init__.pxd -> build\lib.win-amd64-3.8\Cython\Includes\cpython
creating build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_bool.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_buffer.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_bytes.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_cobject.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_complex.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_dict.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_exc.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_float.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_function.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_getargs.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_instance.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_int.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_iterator.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_list.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_long.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_mapping.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_mem.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_method.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_module.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_number.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_object.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_oldbuffer.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_pycapsule.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_ref.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_sequence.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_set.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_string.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_tuple.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_type.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_unicode.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_version.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\python_weakref.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\stdio.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\stdlib.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
copying Cython\Includes\Deprecated\stl.pxd -> build\lib.win-amd64-3.8\Cython\Includes\Deprecated
creating build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\errno.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\float.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\limits.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\locale.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\math.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\setjmp.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\signal.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\stddef.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\stdint.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\stdio.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\stdlib.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\string.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\time.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
copying Cython\Includes\libc\__init__.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libc
creating build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\algorithm.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\cast.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\complex.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\deque.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\forward_list.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\functional.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\iterator.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\limits.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\list.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\map.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\memory.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\pair.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\queue.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\set.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\stack.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\string.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\typeindex.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\typeinfo.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\unordered_map.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\unordered_set.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\utility.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
copying Cython\Includes\libcpp\vector.pxd -> build\lib.win-amd64-3.8\Cython\Includes\libcpp
....
copying Cython\Utility\StringTools.c -> build\lib.win-amd64-3.8\Cython\Utility
copying Cython\Utility\TestUtilityLoader.c -> build\lib.win-amd64-3.8\Cython\Utility
copying Cython\Utility\TypeConversion.c -> build\lib.win-amd64-3.8\Cython\Utility
copying Cython\Utility\arrayarray.h -> build\lib.win-amd64-3.8\Cython\Utility
copying Cython\Utility\CppSupport.cpp -> build\lib.win-amd64-3.8\Cython\Utility
running build_ext
building 'Cython.Plex.Scanners' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for cython
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "C:\Python\Python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['D:\\Python\\Orbit_Project\\kivy_venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\marco\\Tools\\AppData\\Local\\Temp\\tmpx6a6oakm', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/archive/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\marco\Tools\AppData\Local\Temp\pip-install-qbyepev_\kivy\setup.py", line 1073, in <module>
setup(
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\setuptools\__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\setuptools\__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\setuptools\dist.py", line 695, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\pkg_resources\__init__.py", line 781, in resolve
dist = best[req.key] = env.best_match(
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\pkg_resources\__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\pkg_resources\__init__.py", line 1078, in obtain
return installer(requirement)
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\setuptools\dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "D:\Python\Orbit_Project\kivy_venv\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['D:\\Python\\Orbit_Project\\kivy_venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\marco\\Tools\\AppData\\Local\\Temp\\tmpx6a6oakm', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/archive/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.
Using setuptools
User distribution detected, avoid portable command.
Using this graphics system: OpenGL
WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
b"Package gstreamer-1.0 was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `gstreamer-1.0.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'gstreamer-1.0' found\r\n"
WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
b"Package gstreamer-1.0 was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `gstreamer-1.0.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'gstreamer-1.0' found\r\n"
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
b"Package sdl2 was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `sdl2.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'sdl2' found\r\nPackage SDL2_ttf was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `SDL2_ttf.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'SDL2_ttf' found\r\nPackage SDL2_image was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `SDL2_image.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'SDL2_image' found\r\nPackage SDL2_mixer was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `SDL2_mixer.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'SDL2_mixer' found\r\n"
ERROR: Dependency for context.pyx not resolved: config.pxi
ERROR: Dependency for compiler.pyx not resolved: config.pxi
ERROR: Dependency for context_instructions.pyx not resolved: config.pxi
ERROR: Dependency for fbo.pyx not resolved: config.pxi
ERROR: Dependency for gl_instructions.pyx not resolved: config.pxi
ERROR: Dependency for instructions.pyx not resolved: config.pxi
ERROR: Dependency for opengl.pyx not resolved: config.pxi
ERROR: Dependency for opengl_utils.pyx not resolved: config.pxi
ERROR: Dependency for shader.pyx not resolved: config.pxi
ERROR: Dependency for stencil_instructions.pyx not resolved: config.pxi
ERROR: Dependency for scissor_instructions.pyx not resolved: config.pxi
ERROR: Dependency for texture.pyx not resolved: config.pxi
ERROR: Dependency for vbo.pyx not resolved: config.pxi
ERROR: Dependency for vertex.pyx not resolved: config.pxi
ERROR: Dependency for vertex_instructions.pyx not resolved: config.pxi
ERROR: Dependency for cgl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_mock.pyx not resolved: config.pxi
ERROR: Dependency for cgl_gl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_glew.pyx not resolved: config.pxi
ERROR: Dependency for cgl_sdl2.pyx not resolved: config.pxi
ERROR: Dependency for svg.pyx not resolved: config.pxi
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I inserted dots because there were too much caracters in this post, and the deleted sentences are similar.
I installed python in C:\ directory, and I'm trying to install kivy inside my project, as the guide states.
Does anyone know this problem, and he knows how to resolve?
I found similar problems but solutions don't resolve my case.
Thank you very much in advance,
Marco
I found the solution to problem. Simply, Python 3.8.2 is not compatible with kivy, for the moment. I uninstalled it, and I installed Python 3.7.6. Now, it's working perfectly.

Module python-twitter (github) giving error "No Module named cmdline" from shell

I've just installed the latest python twitter build ( https://github.com/bear/python-twitter ) and I'm receiving the below error. I get it when I try to use "twitter" from the shell...the "pip install python-twitter" worked fine, except it uses outdated api. This one seemed it might be updated, but throws the below error.
Error:
Traceback (most recent call last):
File "/usr/local/bin/twitter", line 9, in <module>
load_entry_point('twitter==1.12.1', 'console_scripts', 'twitter')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 353, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2302, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2029, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named cmdline
I'm having a hard time drilling down to what is causing this. Any thoughts?
In response to comments, I'm posting the output for each step, to see why the error remains:
1
pip uninstall twitter
response:
leo#production:~$ sudo pip uninstall twitter
Uninstalling twitter:
/usr/local/lib/python2.7/dist-packages/twitter-1.12.1-py2.7.egg
Proceed (y/n)? y
Successfully uninstalled twitter
2
sudo rm -rf /usr/lib/python2.7/site-packages/twitter-1.10.2-py2.7.egg
(silent)
3
wget https://pypi.python.org/packages/source/t/twitter/twitter-1.12.1.tar.gz
tar -xzf twitter*.tar.gz
cd twitter*
(successful)
3
sudo python setup.py build; sudo python setup.py install
Response:
p.py install
running build
running build_py
running egg_info
writing twitter.egg-info/PKG-INFO
writing top-level names to twitter.egg-info/top_level.txt
writing dependency_links to twitter.egg-info/dependency_links.txt
writing entry points to twitter.egg-info/entry_points.txt
reading manifest file 'twitter.egg-info/SOURCES.txt'
writing manifest file 'twitter.egg-info/SOURCES.txt'
running install
running bdist_egg
running egg_info
writing twitter.egg-info/PKG-INFO
writing top-level names to twitter.egg-info/top_level.txt
writing dependency_links to twitter.egg-info/dependency_links.txt
writing entry points to twitter.egg-info/entry_points.txt
reading manifest file 'twitter.egg-info/SOURCES.txt'
writing manifest file 'twitter.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/follow.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/api.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/twitter_globals.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/ansi.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/stream.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/ircbot.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/timezones.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/auth.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/archiver.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/stream_example.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/cmdline.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/util.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/logger.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/oauth2.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/oauth.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/__init__.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/oauth_dance.py -> build/bdist.linux-x86_64/egg/twitter
byte-compiling build/bdist.linux-x86_64/egg/twitter/follow.py to follow.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/api.py to api.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/twitter_globals.py to twitter_globals.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/ansi.py to ansi.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/stream.py to stream.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/ircbot.py to ircbot.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/timezones.py to timezones.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/auth.py to auth.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/archiver.py to archiver.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/stream_example.py to stream_example.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/cmdline.py to cmdline.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/util.py to util.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/logger.py to logger.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/oauth2.py to oauth2.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/oauth.py to oauth.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/oauth_dance.py to oauth_dance.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/twitter-1.12.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing twitter-1.12.1-py2.7.egg
Copying twitter-1.12.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding twitter 1.12.1 to easy-install.pth file
Installing twitter-log script to /usr/local/bin
Installing twitter script to /usr/local/bin
Installing twitterbot script to /usr/local/bin
Installing twitter-follow script to /usr/local/bin
Installing twitter-stream-example script to /usr/local/bin
Installing twitter-archiver script to /usr/local/bin
Installed /usr/local/lib/python2.7/dist-packages/twitter-1.12.1-py2.7.egg
Processing dependencies for twitter==1.12.1
Finished processing dependencies for twitter==1.12.1
I got this error a while back. What I did is completely remove Python Twitter Tools with:
pip uninstall twitter
sudo rm -rf /usr/lib/python2.7/site-packages/twitter-1.10.2-py2.7.egg
Then I reinstalled it by using:
wget https://pypi.python.org/packages/source/t/twitter/twitter-1.12.1.tar.gz
tar -xzf twitter*.tar.gz
cd twitter*
sudo python setup.py build; sudo python setup.py install
Now it should work.
Found it! Thanks to #RydallCooper I was put on the proper trail :D
I had two packages apparently...
I had to uninstall them both:
pip uninstall twitter
and then:
pip uninstall python-twitter
Now the error is gone :D
(A few years on!) the solution may be to check the versions
E.g. if you're using a Python 3 shell, you may need to use pip3 install twitter rather than just pip install twitter

Categories