Getting errors while installing streamlit usin pip in - python

I am getting the following error while installing streamlit using pip.
How do i fix this.
Is there an alternative way i can download streamlit?
I deleted a few lines of code due to ease of understanding
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python38-32\python.exe' 'c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\dell\AppData\Local\Temp\tmp98zgcj_w'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-
copying pyarrow\tests\parquet\test_parquet_writer.py -> build\lib.win32-3.8\pyarrow\tests\parquet
running build_ext
creating C:\Users\dell\AppData\Local\Temp\pip-install-8d7399fc\pyarrow_54eefc0597024fa083b65739386c1def\build\temp.win32-3.8
Traceback (most recent call last):
cmd_obj.run()
File "setup.py", line 92, in run
self._run_cmake()
File "setup.py", line 280, in _run_cmake
raise RuntimeError('Not supported on 32-bit Windows')
RuntimeError: Not supported on 32-bit Windows
----------------------------------------
ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly

So based on this error message you're using 32-bit Python?
Pyarrow only works for 64 bit operating systems and, therefore, Streamlit became 64 bit dependant after we added this as a dependancy in Streamlit version 0.63!
Is 32 over 64 bit intentional? If not, your hardware system is most likely 64-bit (if it was made in the last 10 years), and switching to 64-bit Python should resolve the error message.
Marisa

Related

Cannot install PyGame in PyCharm No setup file exists [duplicate]

This question already has answers here:
How to install pygame?
(4 answers)
Unable to install Pygame using pip
(27 answers)
Closed 11 days ago.
I am trying to install PyGame on PyCharm.
History:
clicked on File -> New projects setup -> settings for new project -> selected python -> click on "+" -> searched "pygame" on search bar -> install package -> ERROR
but I am getting this error:
Collecting pygame
Using cached pygame-2.1.2.tar.gz (10.1 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[77 lines of output]
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Lorak\AppData\Local\Temp\pip-install-cfn9p2mm\pygame_5ad100b5f0cd46c68e6fee4d61f31110\setup.py", line 359, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\Lorak\AppData\Local\Temp\pip-install-cfn9p2mm\pygame_5ad100b5f0cd46c68e6fee4d61f31110\buildconfig\config.py", line 225, in main
deps = CFG.main(**kwds)
^^^^^^^^^^^^^^^^
File "C:\Users\Lorak\AppData\Local\Temp\pip-install-cfn9p2mm\pygame_5ad100b5f0cd46c68e6fee4d61f31110\buildconfig\config_win.py", line 511, in main
return setup_prebuilt_sdl2(prebuilt_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(...)
File "C:\Users\Lorak\PycharmProjects\gameproject\venv\Lib\site-packages\setuptools\_distutils\msvc9compiler.py", line 403, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(...)
---
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: python.exe -m pip install --upgrade pip`
I don't know how to fit it :(
I tried to install other versions, but there is no difference. Still getting error.
I also tried do it via terminal, but when I use "pip install pygame" another error jumps telling me that "pip is not recognized". I don't know if this is same or other error. I tried to find info on the internet but there is nothing even similar to this error. I have also tried to update pip via manual and it worked, but I am still getting the same error.

Pip returning syntax error when installing package in Python 2.7

I am trying to install a Python package in Wine, but it keeps giving me internal syntax errors. When I tried to install pyinstaller, it gave me this:
C:\>pip install pyinstaller
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting pyinstaller
Using cached pyinstaller-4.1.tar.gz (3.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'c:\Python27\python.exe' 'c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'c:\users\jackpy\temp\tmpo_ofkx'
cwd: c:\users\jackpy\temp\pip-install-tjtlkl\pyinstaller
Complete output (19 lines):
Traceback (most recent call last):
File "c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 243, in run_setup
self).run_setup(setup_script=setup_script)
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 63
file=sys.stderr)
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\Python27\python.exe' 'c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'c:\users\jackpy\temp\tmpo_ofkx' Check the logs for full command output.
I have tried uninstalling and reinstalling using get-pip.py, and it's always the same error.
I am using Python 2.7.18 and Wine 4.0. Can anyone tell me how to fix this?
As far as I can see from the pyinstaller website they have dropped the support of python2.7 from version 4.0, and you are trying to install a version 4.1.0 (https://pyinstaller.readthedocs.io/en/stable/)
Finally, this version drops support for Python 2.7, which is end-of-life since January 2020.. The minimum required version is now Python 3.6.
Also, I do not see any other available version on PyPI, so the only option you have is to upgrade your python to at least version 3.6.
Best of luck!
If Python 2.7 absolutely needs to be used, using the last supported version should still work. Please try
pip install pyinstaller==3.6
See also: How do you downgrade pyinstaller using pip?
Get updated version of python. Your version is way too old
Recently I have been gone through that issue, not like yours but kind of. I deleted every single file related to pyinstaller. And gave it a fresh start

MontagePy-1.0.1-cp36-cp36m-manylinux1_x86_64.whl is not a supported wheel on this platform

Python 3.7 is installed on my 64 bit machine. When I try running pip3 install, I get the message that the wheel file is not supported on my platform.
Here's what I've checked so far :
cp36 in the file name means that I need Python 3.6 or above, so 3.7 fits the bill
my python installation is 64 bits as well (https://stackoverflow.com/a/36158157/3128109)
Since platform requirements are taken from the name of the file, I tried changing the name to MontagePy-1.0.1-cp36-none-any.whl, but I get the same error.
pip --version says pip 19.0.3 from /usr/local/lib/python3.4/dist-packages/pip (python 3.4). Could this be the root of the problem? If so, how would I get pip to run with 3.7 rather than 3.4?
What could cause this platform incompatibility?
The debug log says
/usr/bin/pip3 run on Fri Mar 1 14:09:04 2019
MontagePy-1.0.1-cp36-cp36m-manylinux1_x86_64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "/usr/lib/python3/dist-packages/pip/req.py", line 168, in from_line
raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
pip.exceptions.UnsupportedWheel: MontagePy-1.0.1-cp36-cp36m-manylinux1_x86_64.whl is not a supported wheel on this platform.

pip install pyopencl fails with ImportError: No module named 'numpy'

When installing pyopencl with pip, it complains about missing numpy:
Collecting pyopencl
Downloading https://files.pythonhosted.org/packages/bc/58/3ab1246e94986f1b6953e76d7ea7e69d2dbfef7b3f3874eded48524a024f/pyopencl-2018.2.2.tar.gz (341kB)
100% |████████████████████████████████| 348kB 9.5MB/s
Complete output from command python setup.py egg_info:
---------------------------------------------------------------------------
Pybind11 is not installed.
---------------------------------------------------------------------------
Very likely, the build process after this message will fail.
Simply press Ctrl+C and type
python -m pip install pybind11
to fix this. If you don't, the build will continue
in a few seconds.
[1] https://pybind11.readthedocs.io/en/stable/
---------------------------------------------------------------------------
Continuing in 1 seconds...
---------------------------------------------------------------------------
Mako is not installed.
---------------------------------------------------------------------------
That is not a problem, as most of PyOpenCL will be just fine
without it. Some higher-level parts of pyopencl (such as
pyopencl.reduction) will not function without the templating engine
Mako [1] being installed. If you would like this functionality to
work, you might want to install Mako after you finish
installing PyOpenCL.
Simply type
python -m pip install mako
either now or after the installation completes to fix this.
[1] http://www.makotemplates.org/
---------------------------------------------------------------------------
Hit Ctrl-C now if you'd like to think about the situation.
---------------------------------------------------------------------------
Continuing in 1 seconds...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-nccshu4t/pyopencl/setup.py", line 353, in <module>
main()
File "/tmp/pip-install-nccshu4t/pyopencl/setup.py", line 320, in main
language='c++',
File "/tmp/pip-install-nccshu4t/pyopencl/aksetup_helper.py", line 41, in __init__
self._include_dirs = self.include_dirs
File "/tmp/pip-install-nccshu4t/pyopencl/aksetup_helper.py", line 55, in get_include_dirs
return self._include_dirs + self.get_additional_include_dirs()
File "/tmp/pip-install-nccshu4t/pyopencl/aksetup_helper.py", line 52, in get_additional_include_dirs
return [self.get_numpy_incpath()]
File "/tmp/pip-install-nccshu4t/pyopencl/aksetup_helper.py", line 47, in get_numpy_incpath
file, pathname, descr = find_module("numpy")
File "/home/app/nb-ocl/.venv/lib/python3.5/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'numpy'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-nccshu4t/pyopencl/
This is an issue with the latest version of pyopencl published in PyPI. The latest version in the github repo already addresses this issue, using the new ExtensionUsingNumpy instead of the old NumpyExtension in setup.py::setup().
Still, if Mako and pybind11 dependencies are not installed, the installation of pyopencl wil fail. Why aren't these handled by setup.py/setuptools as well?
Since there are no binaries (wheels) available in PyPI, pip install defaults to pulling the software distribution (sdist) archive and tries to build it. The building process of pyopencl depends on numpy, pybind11 and mako, and for that reason pip fails.
OTOH if pyopencl provided binaries (wheels) this issue could be circumvented. There is a pull request awaiting review that should help with that: https://github.com/inducer/pyopencl/pull/264

IPTCInfo on Python 3.x Windows

I need to extract IPTC metadata from images. Most of the things I've read about Python packages on Windows suggest using pre-compiled binaries, but I don't see one for IPTCInfo, thus I tried pip3.
I'm getting an error from pip when trying to install this:
C:\Users\hackr>pip3 install IPTCInfo
Collecting IPTCInfo
Downloading IPTCInfo-1.9.5-6.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\hackr\AppData\Local\Temp\pip-build-v4m344a7\IPTCInfo\setup.py", line 32
print self.get_archive_files()
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\hackr\AppData\Local\Temp\pip-build-v4m344a7\IPTCInfo
So, I tried to open that last temporary file it refrences, but it doesn't appear to exist...
I have the same problem. Appears the IPTCinfo is for python-2. I will upgrade IPTCinfo for python-3.
However I have found the library exvi2 which provides the same type of image support. There is a python interface for this at https://wiki.gnome.org/Projects/gexiv2
I maintain IPTCInfo3 in Pypi. I recommend downloading it via pip3 install iptcinfo3 as it is specifically upgraded for Python3x. Follow the readme and issue comments for examples. Enjoy.

Categories