Installing devpi-client 4.1.0 fails in python2 virtual environment - python

Running pip install devpi-client==4.1.0 in python2 virtual environment fails with below Installing build dependencies ... error:
ERROR: Command errored out with exit status 1:
command: /private/tmp/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/72/91vhtwlx2v577_2t46dkm6yh0000gq/T/pip-install-Owjkqu/setuptools/setup.py'"'"'; __file__='"'"'/private/var/folders/72/91vhtwlx2v577_2t46dkm6yh0000gq/T/pip-install-Owjkqu/setuptools/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/72/91vhtwlx2v577_2t46dkm6yh0000gq/T/pip-pip-egg-info-357GNw
cwd: /private/var/folders/72/91vhtwlx2v577_2t46dkm6yh0000gq/T/pip-install-Owjkqu/setuptools/
Complete output (10 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "setuptools/version.py", line 1, in <module>
import pkg_resources
File "pkg_resources/__init__.py", line 1365
raise SyntaxError(e) from e
^
SyntaxError: invalid syntax
-----------------------------
Above the error there are lines Collecting setuptools>=42 Downloading .../setuptools-51.1.1.tar.gz (2.1 MB)
setuptools 51.1.1 require minimum python3.6, so it probably explains the syntax error.
Is there a way to force the package to use existing setuptools version or specify which version to use during build dependencies installation?

Related

import win32crypt: ImportError: DLL load failed: The specified module could not be found

when I run my python script, I get this error:
import win32crypt:
ImportError: DLL load failed: The specified module could not be found.
I'm on Windows 10 and I am using Python 2.7 because the project I am trying to run was made in python 2.7
I tried running the script and got this error.
I tried all the solutions in this thread too: Can't import win32crypt python module
except pip install pypiwin32: which returns this error:
Using cached pypiwin32-223.tar.gz (622 bytes)
ERROR: Command errored out with exit status 1:
command: 'C:\Python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\matma\\appdata\\local\\temp\\pip-install-f4ecmx\\pypiwin32\\setup.py'"'"'; __file__='"'"'c:\\users\\matma\\appdata\\local\\temp\\pip-install-f4ecmx\\pypiwin32\\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\matma\appdata\local\temp\pip-pip-egg-info-tsajuh'
cwd: c:\users\matma\appdata\local\temp\pip-install-f4ecmx\pypiwin32\
Complete output (10 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\lib\site-packages\setuptools\__init__.py", line 21, in <module>
import setuptools.version
File "C:\Python27\lib\site-packages\setuptools\version.py", line 1, in <module>
import pkg_resources
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 1380
raise SyntaxError(e) from e
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

ModuleNotFoundError: No module named '_ctypes' while installing libraries

I have not found any useful answers elsewhere, so I want to ask for help here.
I'm trying to set up a VPS and I need some libraries (like datetime and random), however, when I type pip3.10 install datetime, it just gives me a bunch of errors:
WARNING: Discarding https://files.pythonhosted.org/packages/e5/4f/86e90a34419df9c32a6e88b06f18233cffe93a236f7d2690f707c816fbe6/zope.interface-5.1.2.tar.gz#sha256=c9c8e53a5472b77f6a391b515c771105011f4b40740ce53af8428d1c8ca20004 (from https://pypi.org/simple/zope-interface/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached zope.interface-5.1.1.tar.gz (228 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.10 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f5fedo38/zope-interface_a42655eef45a4ad1a0d08ba394ed5e01/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f5fedo38/zope-interface_a42655eef45a4ad1a0d08ba394ed5e01/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-pc68spm2
cwd: /tmp/pip-install-f5fedo38/zope-interface_a42655eef45a4ad1a0d08ba394ed5e01/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 18, in <module>
from setuptools.dist import Distribution
File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 38, in <module>
from setuptools import windows_support
File "/usr/local/lib/python3.10/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/usr/local/lib/python3.10/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
What should I do?
As it seems, you are trying to install all built-in modules.
You don't have to reinstall them at all

why I am getting this error while installing : pip install pyobjc-framework-Quartz

why Iam getting this error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\kodal\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kodal\\AppData\\Local\\Temp\\pip-install-odzer82v\\pyobjc-framework-Quartz\\setup.py'"'"'; __file__='"'"'C:\\Users\\kodal\\AppData\\Local\\Temp\\pip-install-odzer82v\\pyobjc-framework-Quartz\\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\kodal\AppData\Local\Temp\pip-install-odzer82v\pyobjc-framework-Quartz\pip-egg-info'
cwd: C:\Users\kodal\AppData\Local\Temp\pip-install-odzer82v\pyobjc-framework-Quartz\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\kodal\AppData\Local\Temp\pip-install-odzer82v\pyobjc-framework-Quartz\setup.py", line 67, in <module>
py_limited_api=True,
File "C:\Users\kodal\AppData\Local\Temp\pip-install-odzer82v\pyobjc-framework-Quartz\pyobjc_setup.py", line 420, in Extension
if "clang" in get_config_var("CC"):
TypeError: argument of type 'NoneType' is not iterable
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'll take a guess here, but your traceback shows that you're on Windows, but pyobjc-framework-Quartz is a macOS framework. That same command worked fine on my macOS machine.

Cannot install pyOTDR

I need to install pyOTDR but some issues are preventing me to do so.
As suggested in the webpage, I tried
pip install pyOTDR
but I get
Command errored out with exit status 1
This is the whole console log:
ERROR: Command errored out with exit status 1:
command: 'c:\users\campione\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\campione\\AppData\\Local\\Temp\\pip-install-fiabozry\\lazyxml\\setup.py'"'"'; __file__='"'"'C:\\Users\\campione\\AppData\\Local\\Temp\\pip-install-fiabozry\\lazyxml\\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\campione\AppData\Local\Temp\pip-pip-egg-info-_nv05fei'
cwd: C:\Users\campione\AppData\Local\Temp\pip-install-fiabozry\lazyxml\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\campione\AppData\Local\Temp\pip-install-fiabozry\lazyxml\setup.py", line 16, in <module>
import lazyxml
File "C:\Users\campione\AppData\Local\Temp\pip-install-fiabozry\lazyxml\lazyxml\__init__.py", line 15, in <module>
from . import builder
File "C:\Users\campione\AppData\Local\Temp\pip-install-fiabozry\lazyxml\lazyxml\builder.py", line 7, in <module>
import utils
ModuleNotFoundError: No module named 'utils'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm completely new to Python so bear with me, but I think it can maybe be related to "utils" module missing, as you can read at the end.
I don't understand why I could install other python packages in the same way but not this one unfortunately.
Removing Python 3 and installing Python 2 worked for some reason.

Error when trying to install pyDNS for python 2.7

When I try to install pyDNS by "pip install pyDNS" i get;
ERROR: Command errored out with exit status 1:
command: 'c:\users\עידן\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\עידן\\AppData\\Local\\Temp\\pip-install-856byly1\\pydns\\setup.py'"'"'; __file__='"'"'C:\\Users\\עידן\\AppData\\Local\\Temp\\pip-install-856byly1\\pydns\\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\עידן\AppData\Local\Temp\pip-install-856byly1\pydns\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\עידן\AppData\Local\Temp\pip-install-856byly1\pydns\setup.py", line 12, in <module>
import DNS
File "C:\Users\עידן\AppData\Local\Temp\pip-install-856byly1\pydns\DNS\__init__.py", line 14, in <module>
import Type,Opcode,Status,Class
ModuleNotFoundError: No module named 'Type'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check
the logs for full command output.
I see python38-32 in the directory path. It's not Python 2.7, and the module is Python2-only.

Categories