pip install git+url issue || Google colab - python

enter image description hereI just created a set of functions for retrieving data of API so I shared it on my githhub website.
I tried to install my packages on google colab using pip install git+url but the only a get is the following error:
Exit code 1
note: This error originates from a subprocess, and is likely not a problem with pip.
Preparing metadata (setup.py) ... error
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.
I'm new at github so i don't know if there is something that I'm missing at setting up my packages.
I would be grateful if someone can help me
I left my git below
https://github.com/maxelOA/py_erpy2set.git

There's a syntax error in your setup.py script. You have two ++ at the bottom. Try removing those, should solve this error.
This is why it's helpful to get the full error message (stack trace), when I tried running this on my console I got error message:
ERROR: Command errored out with exit status 1:
command: /home/matthias/projects/playground/as_env/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/matthias/projects/playground/as_env/src/erpy2set/setup.py'"'"'; __file__='"'"'/home/matthias/projects/playground/as_env/src/erpy2set/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4we41jtq
cwd: /home/matthias/projects/playground/as_env/src/erpy2set/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/matthias/projects/playground/as_env/src/erpy2set/setup.py", line 17
++
^
SyntaxError: invalid syntax
----------------------------------------
WARNING: Discarding git+https://github.com/maxelOA/erpy2set#egg=erpy2set. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement erpy2set (unavailable) (from versions: none)
ERROR: No matching distribution found for erpy2set (unavailable)
WARNING: You are using pip version 21.2.3; however, version 23.0.1 is available.
You should consider upgrading via the '/home/matthias/projects/playground/as_env/bin/python -m pip install --upgrade pip' command.
Which then prompted me to look at the setup.py file.
The error message you posted must be just the error from google colab or whatever ide you are using, there must be some way to see the "see the above for output" part to get the more relevant info.

Related

pip install arcade keeps giving "Could not find module 'geos_c.dll' (or one of it dependencies). geos.dll and geos_c.dll unfindable

Long post for one error I keep getting:
PC, Windows 10, I have used PyCharm, VS Code, Powershell for pip installations, virtual environments as well as normal.
I am trying to get the arcade library installed, so I can get to building a platform type game with a friend. Having done research on what libraries to use, we came across Arcade, looking perfect for our idea for the platformer.
https://api.arcade.academy/en/latest/examples/platform_tutorial/step_01.html
And
https://api.arcade.academy/en/latest/install/windows.html
Now here's the crux. I have followed all the steps, have tried installing it in various ways (virtual environments as well), but I keep getting the same error code (please continue reading after the error codes, as I've tried various solutions already):
PS C:\Users\Grace\AppData\Local\Programs\Python\Python310> pip install arcade
Collecting arcade
Using cached arcade-2.6.3-py3-none-any.whl (39.2 MB)
Collecting shapely==1.7.1
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Grace\AppData\Local\Programs\Python\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\pip-install-labiwb90\\shapely_c43a03848a5e4619a6d0372e22fc4a7c\\setup.py'"'"'; __file__='"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\pip-install-labiwb90\\shapely_c43a03848a5e4619a6d0372e22fc4a7c\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Grace\AppData\Local\Temp\pip-pip-egg-info-0b2ppic9'
cwd: C:\Users\Grace\AppData\Local\Temp\pip-install-labiwb90\shapely_c43a03848a5e4619a6d0372e22fc4a7c\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Grace\AppData\Local\Temp\pip-install-labiwb90\shapely_c43a03848a5e4619a6d0372e22fc4a7c\setup.py", line 85, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\Grace\AppData\Local\Temp\pip-install-labiwb90\shapely_c43a03848a5e4619a6d0372e22fc4a7c\shapely\_buildcfg.py", line 205, in <module>
lgeos = CDLL("geos_c.dll")
File "C:\Users\Grace\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/42/f3/0e1bc2c4f15e05e30c6b99322b9ddaa2babb3f43bc7df2698efdc1553439/Shapely-1.7.1.tar.gz#sha256=1641724c1055459a7e2b8bbe47ba25bdc89554582e62aec23cb3f3ca25f9b129 (from https://pypi.org/simple/shapely/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Having already tried to research this (and finding many questions for the shapely lib, as that's where it is coming from by the looks of it) and many, many different solutions, I keep still getting the same error.
I have tried installing shapely, but each line gives me the following error, all the way to version 1.5.9.tar.gz
PS E:\GAME\project> pip install shapely
Collecting shapely
Using cached Shapely-1.8.0.tar.gz (278 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'e:\my virtual env\this one\scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\p
ip-install-sly8ntwk\\shapely_e4ed214432664ba8b60621c78133751b\\setup.py'"'"'; __file__='"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\pip-install-sly8ntwk\\shapely_e4ed
214432664ba8b60621c78133751b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools impo
rt setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Grace\AppData\Local\Temp\pip-pip-egg-info-a5sb9s6p'
cwd: C:\Users\Grace\AppData\Local\Temp\pip-install-sly8ntwk\shapely_e4ed214432664ba8b60621c78133751b\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Grace\AppData\Local\Temp\pip-install-sly8ntwk\shapely_e4ed214432664ba8b60621c78133751b\setup.py", line 74, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\Grace\AppData\Local\Temp\pip-install-sly8ntwk\shapely_e4ed214432664ba8b60621c78133751b\shapely\_buildcfg.py", line 204, in <module>
lgeos = CDLL("geos_c.dll")
File "C:\Users\Grace\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1c/0c/454c80f71bd5ece52fb06d2905bf956b9122f4be539d5ae5df4b10dd3e14/Shapely-1.8.0.tar.gz#sha256=f5307ee14ba41
99f8bbcf6532ca33064661c1433960c432c84f0daa73b47ef9c (from https://pypi.org/simple/shapely/) (requires-python:>=3.6). Command errored out with exit status 1: python setu
p.py egg_info Check the logs for full command output.
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
Solutions tried:
I have gone to the geos website, downloaded and installed OSGeo4W. This file is installed and exists on my C drive and has both dll files in it.
I've added several paths as well, directing to various places these dll files can now be found in as they are on my PC.
We have even looked in the geos.py file to figure out what it does and where it goes wrong. The code will error out and say it cannot find geos.dll in a folder where the actual file is.
So now I'm stuck, my friend and I have exhausted all possible solutions he and I could come up with or find to try and resolve it, and I am unable to find a way to code using arcade due to this geos.dll and geos_c.dll file errors.
As it turns out, the Arcade lib documentation mentions using Python 3.7 on Windows 10, whereas my Miniconda was using Python 3.9 and my VS Code Python 3.10.
Using the Anaconda Prompt to install Python 3.7, then allowed me to install both arcade and shapely without any problems.
Shapely never upgraded to work on Windows with Python 3.10. The current versions of Arcade make Shapely optional and fall back to non-shapely Python code.

Halberd - ERROR: Command errored out with exit status 1:

I am trying to install the w3af framework, I had some inconveniences as any installation that must be configured several things, I am stuck in the part where you install halberd (halberd-0.2.4.tar.gz):
Collecting halberd==0.2.4
Downloading halberd-0.2.4.tar.gz (214 kB)
|████████████████████████████████| 214 kB 1.8 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yl9osjq5/halberd/setup.py'"'"'; file='"'"'/tmp/pip-install-yl9osjq5/halberd/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 /tmp/pip-install-yl9osjq5/halberd/pip-egg-info
cwd: /tmp/pip-install-yl9osjq5/halberd/
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-yl9osjq5/halberd/setup.py", line 72
print "Running tests found in '%s'..." % module
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Running tests found in '%s'..." % module)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I already tried to download the file and install it from pypi.org (https://pypi.org/project/halberd/) and I got the same error, how can I fix it?
The halberd library on Pypi has not been updated since 2010 - it is unmaintained, and incompatible with modern python versions. There is a halberd project on Github, but that was also not updated since 2017.
The w3af project itself has many dependencies on unmaintained libraries, was developed for python2 (which is no longer supported), and has not been updated by its maintainer in a couple of years.
If you are interested in using the framework still, you can check out the w4af project on Github, which includes the same functionality, but has been ported to python3, and all dependencies have also been updated to versions that work with python3.

Issue installing bpy package python

I'm trying to install the bpy package and I’m getting this error:
sara#studentacbook94 ~ % pip install bpy
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. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting bpy
Using cached bpy-1.2.2.tar.gz (20 kB)
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/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 /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/pip-egg-info
cwd: /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py", line 179
def build_cmake(self, extension: Extension):
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How can I deal with it?
This error appeared because you're using Python 2.7, and desired package has Type Hints, which were added only in 3.5 (documentaion).
Upgrade your version of Python

package 'preprocess' installing error using pip command

I am trying to install the package 'preprocess' from inside terminal of pyCharm IDE but it is showing the folloiwing error.
i tried this command
pip install preprocess
and I am getting following errors
Collecting preprocess
Using cached
https://files.pythonhosted.org/packages/05/f9/559841df6c91428a2024ce120d92 192844178e4b2ceec1da84ce18205380/pr
eprocess-1.1.0.zip
ERROR: Command errored out with exit status 1:
command: 'c:\users\majid\appdata\local\programs\python\python38- 32\python.exe' -c 'import sys, setuptools, tokenize; sy
s.argv[0] = '"'"'C:\\Users\\majid\\AppData\\Local\\Temp\\pip- install-rsxg10hs\\preprocess\\setup.py'"'"'; __file__='"'"'C:\\
Users\\majid\\AppData\\Local\\Temp\\pip-install- rsxg10hs\\preprocess\\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\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\pip-egg-info'
cwd: C:\Users\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\setup.py", line 28, in <module>
import preprocess
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\lib\preprocess.py", line 264
except Exception, ex:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
As the release history of the project preprocess shows, it's a very old project that hasn't had a release in over 10 years. It is very unlikely to be compatible with current versions of Python. The error output in the question seems to show the error message comes from trying to install the project for Python 3.8 and the error itself seems to show that it fails on code with the Python 2 syntax.
I would not recommend using this project at all. Alternatively you could try using it with a Python 2 version of the interpreter.

Unable to install ssl in my local system using pip install ssl

I'm very new to python and when i tried to install some lib it is giving me this issue. can you please help on what to do.
When trying to install ssl using pip command it is giving me the below error
"pip install ssl"
Collecting ssl
Using cached https://files.pythonhosted.org/packages/83/21/f469c9923235f8c36d5fd5334ed11e2681abad7e0032c5aba964dcaf9bbb/ssl-1.16.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\rajesh_navaneeth\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"'; __file__='"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\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 pip-egg-info
cwd: C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
long story short, don't install that python package. It's deprecated (shouldn't be installed in Python 2.6 and newer) and your python already includes ssl package.
In general you shouldn't even be able to install it via pip, but I guess that it's so old that setup.py didn't support version restrictions in the same way it does now.

Categories