I was trying to install twisted in pipenv for my project But I came across this error I will be thanked if anyone help me. I am using python=3.8.2
I install the package by this command:
pipenv install twisted
Here's the error
Installing twisted…
Adding twisted to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock (f7d8de) out of date, updating to (fcb166)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Success!
Updated Pipfile.lock (f7d8de)!
Installing dependencies from Pipfile.lock (f7d8de)…
An error occurred while installing clx==0.0.1 --hash=sha256:2ade62ba519b37da57b7b1f84b51dc6af12fc40fba78955184b1b02762e92396! Will try again.
An error occurred while installing twisted[tls]==20.3.0 --hash=sha256:040eb6641125d2a9a09cf198ec7b83dd8858c6f51f6770325ed9959c00f5098f --hash=sha256:147780b8caf21ba2aef3688628eaf13d7e7fe02a86747cd54bfaf2140538f042 --hash=sha256:158ddb80719a4813d292293ac44ba41d8b56555ed009d90994a278237ee63d2c --hash=sha256:2182000d6ffc05d269e6c03bfcec8b57e20259ca1086180edaedec3f1e689292 --hash=sha256:25ffcf37944bdad4a99981bc74006d735a678d2b5c193781254fbbb6d69e3b22 --hash=sha256:3281d9ce889f7b21bdb73658e887141aa45a102baf3b2320eafcfba954fcefec --hash=sha256:356e8d8dd3590e790e3dba4db139eb8a17aca64b46629c622e1b1597a4a92478 --hash=sha256:70952c56e4965b9f53b180daecf20a9595cf22b8d0935cd3bd664c90273c3ab2 --hash=sha256:7408c6635ee1b96587289283ebe90ee15dbf9614b05857b446055116bc822d29 --hash=sha256:7c547fd0215db9da8a1bc23182b309e84a232364cc26d829e9ee196ce840b114 --hash=sha256:894f6f3cfa57a15ea0d0714e4283913a5f2511dbd18653dd148eba53b3919797 --hash=sha256:94ac3d55a58c90e2075c5fe1853f2aa3892b73e3bf56395f743aefde8605eeaa --hash=sha256:a58e61a2a01e5bcbe3b575c0099a2bcb8d70a75b1a087338e0c48dd6e01a5f15 --hash=sha256:c09c47ff9750a8e3aa60ad169c4b95006d455a29b80ad0901f031a103b2991cd --hash=sha256:ca3a0b8c9110800e576d89b5337373e52018b41069bc879f12fa42b7eb2d0274 --hash=sha256:cd1dc5c85b58494138a3917752b54bb1daa0045d234b7c132c37a61d5483ebad --hash=sha256:cdbc4c7f0cd7a2218b575844e970f05a1be1861c607b0e048c9bceca0c4d42f7 --hash=sha256:d267125cc0f1e8a0eed6319ba4ac7477da9b78a535601c49ecd20c875576433a --hash=sha256:d72c55b5d56e176563b91d11952d13b01af8725c623e498db5507b6614fc1e10 --hash=sha256:d95803193561a243cb0401b0567c6b7987d3f2a67046770e1dccd1c9e49a9780 --hash=sha256:e92703bed0cc21d6cb5c61d66922b3b1564015ca8a51325bd164a5e33798d504 --hash=sha256:f058bd0168271de4dcdc39845b52dd0a4a2fecf5f1246335f13f5e96eaebb467 --hash=sha256:f3c19e5bd42bbe4bf345704ad7c326c74d3fd7a1b3844987853bef180be638d4! Will try again.
================================ 35/35 - 00:01:09
Installing initially failed dependencies…
================================ 2/2 - 00:00:36
[pipenv.exceptions.InstallError]: File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\cli\command.py", line 235, in install
[pipenv.exceptions.InstallError]: retcode = do_install(
[pipenv.exceptions.InstallError]: File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 1983, in do_install
[pipenv.exceptions.InstallError]: do_init(
[pipenv.exceptions.InstallError]: File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 1246, in do_init
[pipenv.exceptions.InstallError]: do_install_dependencies(
[pipenv.exceptions.InstallError]: File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 862, in do_install_dependencies
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, False, failed_deps_queue, retry=False)
[pipenv.exceptions.InstallError]: File "c:\users\hp\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting clx==0.0.1', ' Using cached clx-0.0.1.tar.gz (1.1 kB)', 'Building wheels for collected packages: clx', ' Building wheel for clx (setup.py): started', " Building wheel for clx (setup.py): finished with status 'error'", ' Running setup.py clean for clx', 'Failed to build clx', 'Installing collected packages: clx', ' Running setup.py install for clx: started', " Running setup.py install for clx: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', ' command: \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\Scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\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\\hp\\AppData\\Local\\Temp\\pip-wheel-fsi8qkme\'', ' cwd: C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\', ' Complete output (25 lines):', ' running bdist_wheel', ' running build', ' installing to build\\bdist.win32\\wheel', ' running install', ' Traceback (most recent call last):', ' File "<string>", line 1, in <module>', ' File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 18, in <module>', ' setup(name=pkg,', ' File "C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\lib\\site-packages\\setuptools\\__init__.py", line 144, in setup', ' return distutils.core.setup(**attrs)', ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\core.py", line 148, in setup', ' dist.run_commands()', ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 966, in run_commands', ' self.run_command(cmd)', ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 985, in run_command', ' cmd_obj.run()', ' File "C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\lib\\site-packages\\wheel\\bdist_wheel.py",
line 259, in run', " self.run_command('install')", ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\cmd.py", line 313, in run_command', ' self.distribution.run_command(command)', ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 985, in run_command', ' cmd_obj.run()', ' File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 15, in run', ' raise Exception(long_description)', ' Exception: Please install clx via the rapidsai conda channel. See https://rapids.ai/start.html for instructions.', ' ----------------------------------------', ' ERROR: Failed building wheel for clx', ' ERROR: Command errored out with exit status 1:',
' command: \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\Scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record \'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-record-y6sug7_2\\install-record.txt\' --single-version-externally-managed --compile --install-headers \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\include\\site\\python3.8\\clx\'', ' cwd: C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\', ' Complete output (16 lines):', ' running install', '
Traceback (most recent call last):', ' File "<string>", line 1, in <module>', ' File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 18, in <module>', ' setup(name=pkg,', ' File "C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\lib\\site-packages\\setuptools\\__init__.py", line 144, in setup', ' return distutils.core.setup(**attrs)', ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\core.py", line 148, in setup', ' dist.run_commands()', ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 966, in run_commands', ' self.run_command(cmd)', ' File "c:\\users\\hp\\appdata\\local\\programs\\python\\python38-32\\lib\\distutils\\dist.py", line 985, in run_command', ' cmd_obj.run()', ' File "C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-ioer2ly9\\clx\\setup.py", line 15, in run', ' raise Exception(long_description)', ' Exception: Please install clx via the rapidsai conda channel. See https://rapids.ai/start.html for instructions.', ' ----------------------------------------', 'ERROR: Command errored out with exit status 1: \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\Scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\hp\\\\AppData\\\\Local\\\\Temp\\\\pip-install-ioer2ly9\\\\clx\\\\setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record \'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-record-y6sug7_2\\install-record.txt\' --single-version-externally-managed --compile --install-headers \'C:\\Users\\hp\\.virtualenvs\\Project3-mut8lcbm\\include\\site\\python3.8\\clx\' Check the logs for full command output.']
ERROR: ERROR: Package installation failed...
I've successfully installed twisted on a Colab running Python 3.6. There are one, maybe two, issues ATM:
Right now, your issue is that your install is trying to pip install a now conda only packaged called clx.
Exception: Please install clx via the rapidsai conda channel. See https://rapids.ai/start.html for instructions.
However, twisted has no requirements for clx that I can see, so I'm not sure where your error is coming from with your given information. twisted also installs just fine, as shown in the Colab here: https://colab.research.google.com/drive/1aXn-kuMyMWLRcQs_-BRfI98iLe8cH5fL?usp=sharing.
Not sure is this is a blocker yet, but you also may want to use Python 3.5/3.6/3.7 as per twisted's install requirements -> https://github.com/twisted/twisted/blob/trunk/INSTALL.rst.
If you are, as per your error message, trying to install and use the RAPIDS CLX package somewhere, your issue is that you're trying to pip install CLX. CLX needs to be installed via conda.
Please
Ensure that you have or install the minimal conda installation with Miniconda or get the full installation with Anaconda
Install python 3.7
Install CLX with conda install -c rapidsai clx
Retry your installation
Maybe just doing that will remove the error and you can proceed in happiness.
Related
I am deploying a Docker container with AWS Lambda which executes a machine learning model. But whenever I attempt to load the saved checkpoints, I am getting a permission denied message when attempting to read the local filesystem or a no directory found based on where I am storing the model...?
Here is the relevant Dockerfile:
FROM public.ecr.aws/lambda/python:3.8
# copy requirements.txt file to the container
COPY requirements.txt ./
# upgrade pip and install the python requirements from requirements.txt
RUN python3.8 -m pip install \
--upgrade pip
RUN python3.8 -m pip install \
-r requirements.txt
# Copy function code
COPY app.py ./
# Install the runtime interface client
RUN python3.8 -m pip install \
awslambdaric
# clean up image for small container
RUN find . -type d -name "tests" -exec rm -rf {} +
RUN find . -type d -name "__pycache__" -exec rm -rf {} +
RUN find . -type d -name "include" -exec rm -rf {} +
RUN rm -rf ./{caffe2,wheel,wheel-*,pkg_resources,boto*,aws*,pip,pip-*,pipenv,setuptools}
RUN rm -rf ./{*.egg-info,*.dist-info}
RUN find . -name \*.pyc -delete
RUN find . -type d -name "test" -exec rm -rf {} +
RUN ls -R -al
# update linux libraries
RUN yum update -y
# install python3 and unzip
RUN yum install -y python3 unzip
# pull model files
RUN mkdir ./model
RUN curl https://somewhere.com/model.zip -o ./model/model.zip
RUN unzip ./model/model.zip -d ./model
RUN chmod 644 ./model
RUN chmod -R 644 ./model/*
RUN rm ./model/model.zip
WORKDIR ./
ENTRYPOINT [ "python3", "-m", "awslambdaric" ]
CMD [ "app.lambda_handler" ]
And the app.py:
from __future__ import print_function
import json, time
import urllib.request
from jose import jwk, jwt
from jose.utils import base64url_decode
from sentence_transformers import SentenceTransformer, util
model = ModelFunction('/model')
def lambda_handler(event, context):
body = json.loads(event['body'])
token = body['jwttoken']
utterance = body['utterance']
comparestring = body['comparestring']
# generate embeddings for each phrase
embeddings1 = model.encode(utterance, convert_to_tensor=True)
embeddings2 = model.encode(comparestring, convert_to_tensor=True)
# compute score
score = util.embeddings(embeddings1, embeddings2)
# output score
print("Score:")
print(score.item())
return {
"statusCode": 200,
"score": json.dums(score.item())
}
# the following is useful to make this script executable in both
# AWS Lambda and any other local environments
if __name__ == '__main__':
event = {
'token': '',
'email': 'somewhere#somewhere.com'}
lambda_handler(event, None)
A couple of the relevant error messages:
[ERROR] PermissionError: [Errno 13] Permission denied: './model/modules.json'
Traceback (most recent call last):
File "/var/lang/lib/python3.8/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/var/lang/lib/python3.8/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/task/app.py", line 8, in <module>
model = model('./model')
File "/var/lang/lib/python3.8/site-packages/model/model.py", line 115, in __init__
with open(os.path.join(model_path, 'modules.json')) as fIn:
and
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/home/sbx_user1051/.cache/model'
Traceback (most recent call last):
File "/var/lang/lib/python3.8/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/var/lang/lib/python3.8/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/task/app.py", line 8, in <module>
model = model('/model')
File "/var/lang/lib/python3.8/site-packages/model/model.py", line 101, in __init__
shutil.rmtree(model_path)
File "/var/lang/lib/python3.8/shutil.py", line 709, in rmtree
onerror(os.lstat, path, sys.exc_info())
File "/var/lang/lib/python3.8/shutil.py", line 707, in rmtree
orig_st = os.lstat(path)
Any ideas? I think I am not storing the model checkpoints in the correct directory? The above logs have been somewhat scrubbed due to NDA etc.
Try running:
chmod 644 $(find . -type f)
chmod 755 $(find . -type d)
on the files you're trying to deploy.
As the AWS Docs say, there may be a permissions issue if the files aren't set to be executable by any user.
Building wheel for lief (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vgv9vwph/lief/setup.py'"'"'; file='"'"'/tmp/pip-install-vgv9vwph/lief/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 /tmp/pip-wheel-7w2iswl4
cwd: /tmp/pip-install-vgv9vwph/lief/
Complete output (46 lines):
0.10.1
running bdist_wheel
running build
running build_ext
Traceback (most recent call last):
File "/tmp/pip-install-vgv9vwph/lief/setup.py", line 72, in run
subprocess.check_output(['cmake', '--version'])
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cmake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-vgv9vwph/lief/setup.py", line 363, in
setup(
File "/home/kali/.local/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-vgv9vwph/lief/setup.py", line 74, in run
raise RuntimeError("CMake must be installed to build the following extensions: " +
RuntimeError: CMake must be installed to build the following extensions: lief
ERROR: Failed building wheel for lief
Running setup.py clean for lief
Failed to build lief
Installing collected packages: lief
Running setup.py install for lief ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vgv9vwph/lief/setup.py'"'"'; file='"'"'/tmp/pip-install-vgv9vwph/lief/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hb45g1s1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/kali/.local/include/python3.8/lief
cwd: /tmp/pip-install-vgv9vwph/lief/
Complete output (48 lines):
0.10.1
running install
running build
running build_ext
Traceback (most recent call last):
File "/tmp/pip-install-vgv9vwph/lief/setup.py", line 72, in run
subprocess.check_output(['cmake', '--version'])
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cmake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-vgv9vwph/lief/setup.py", line 363, in <module>
setup(
File "/home/kali/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/kali/.local/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-vgv9vwph/lief/setup.py", line 74, in run
raise RuntimeError("CMake must be installed to build the following extensions: " +
RuntimeError: CMake must be installed to build the following extensions: lief
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vgv9vwph/lief/setup.py'"'"'; file='"'"'/tmp/pip-install-vgv9vwph/lief/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hb45g1s1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/kali/.local/include/python3.8/lief Check the logs for full command output.
You need to install CMake and it has to be in a path accessible by python.
If you are using homebrew,
brew install cmake
Noticed you were using kali
apt install cmake
[QTL-seq:2019-10-09 09:13:37] !!ERROR!! bcftools concat -a -O z -o Chikpea_qtl/30_vcf/qtlseq.vcf.gz Chikpea_qtl/30_vcf/qtlseq.*.vcf.gz >> Chikpea_qtl/log/bcftools.log 2>&1
Failed to open Chikpea_qtl/30_vcf/qtlseq.NW_004516646.1.vcf.gz: could not load index
Traceback (most recent call last):
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/mpileup.py", line 191, in concat
check=True)
File "/home/jthakur/anaconda2/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'bcftools concat -a -O z -o Chikpea_qtl/30_vcf/qtlseq.vcf.gz Chikpea_qtl/30_vcf/qtlseq.*.vcf.gz >> Chikpea_qtl/log/bcftools.log 2>&1' returned non-zero exit status 255.
Traceback (most recent call last):
File "/home/jthakur/anaconda2/bin/qtlseq", line 11, in
load_entry_point('qtlseq', 'console_scripts', 'qtlseq')()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/qtlseq.py", line 192, in main
QTLseq(args).run()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/qtlseq.py", line 123, in mpileup
mp.run()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/mpileup.py", line 232, in run
self.concat()
File "/home/jthakur/Desktop/Software/QTL-seq/qtlseq/mpileup.py", line 194, in concat
sys.exit()
NameError: name 'sys' is not defined
I am currently trying to install two libraries.
Running: C:\Users\J39304\Desktop>python -m pip install pyinstaller yields me the following error:
> C:\Users\jerry\Desktop>python -m pip install pyinstaller
> Looking in indexes: https://repo-manager-location-proprietarysimple
> Collecting pyinstaller
>
>
> Using cached https://repo-manager-location-proprietarypackages/03/32/hash/PyInstaller-3.4.tar.gz
>
>
> Installing build dependencies ... error
> ERROR: Complete output from command 'C:\Python35-32\python.exe' 'C:\Python35-32\lib\site-packages\pip' install --ignore-installed
> --no-user --prefix 'C:\Users\jerry\AppData\Local\Temp\pip-build-env-a6x0i3h0\overlay'
> --no-warn-script-location --no-binary :none: --only-binary :none: -i https://repo-manager-location-proprietarysimple -- setuptools wheel:
>
>
> ERROR: Traceback (most recent call last):
> File "C:\Python35-32\lib\runpy.py", line 170, in _run_module_as_main
> "__main__", mod_spec)
> File "C:\Python35-32\lib\runpy.py", line 85, in _run_code
> exec(code, run_globals)
> File "C:\Python35-32\lib\site-packages\pip\__main__.py", line 16, in <module>
> from pip._internal import main as _main # isort:skip # noqa
> File "C:\Python35-32\lib\site-packages\pip\_internal\__init__.py", line 40,
> in <module>
> from pip._internal.cli.autocompletion import autocomplete
> File "C:\Python35-32\lib\site-packages\pip\_internal\cli\autocompletion.py",
> line 8, in <module>
> from pip._internal.cli.main_parser import create_main_parser
> File "C:\Python35-32\lib\site-packages\pip\_internal\cli\main_parser.py",
> line 12, in <module>
> from pip._internal.commands import (
> File "C:\Python35-32\lib\site-packages\pip\_internal\commands\__init__.py",
> line 6, in <module>
> from pip._internal.commands.completion import CompletionCommand
> File "C:\Python35-32\lib\site-packages\pip\_internal\commands\completion.py",
> line 6, in <module>
> from pip._internal.cli.base_command import Command
> File "C:\Python35-32\lib\site-packages\pip\_internal\cli\base_command.py",
> line 25, in <module>
> from pip._internal.index import PackageFinder
> File "C:\Python35-32\lib\site-packages\pip\_internal\index.py", line 41, in
> <module>
> from pip._internal.wheel import Wheel
> File "C:\Python35-32\lib\site-packages\pip\_internal\wheel.py", line 7, in
> <module>
> import compileall
> File "C:\Python35-32\lib\compileall.py", line 20, in <module>
> from concurrent.futures import ProcessPoolExecutor
> File "C:\Python35-32\lib\site-packages\concurrent\futures\__init__.py",
> line 8, in <module>
> from concurrent.futures._base import (FIRST_COMPLETED,
> File "C:\Python35-32\lib\site-packages\concurrent\futures\_base.py", line
> 414
> raise exception_type, self._exception, self._traceback
> ^
> SyntaxError: invalid syntax
> ----------------------------------------
> ERROR:
> Command "'C:\Python35-32\python.exe'
> 'C:\Python35-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\jerry\AppData\Local\Temp\pip-build-env-a6x0i3h0\overlay'
> --no-warn-script-location --no-binary :none: --only-binary :none: -i https://repo-manager-location-proprietarysimple -- setuptools wheel"
> failed with error code 1 in None
I also noticed that running a similar command, C:\Users\J39304\Desktop>python -m pip install auto-py-to-exe, results in the exact same error.
However, when I ran C:\Users\J39304\Desktop>python -m pip install keras it installed just fine.
I have already made sure that I am using the latest version of pip by running python -m pip install --upgrade pip
I have not found any resources for this error.
raise X, Y is Python2-only syntax. Somehow you've managed to install a Python2-only library to Python3 site-packages. You need to cleanup site-packages and install newer versions of libraries.
System Details:
Operating System: Ubuntu 19.04
Anaconda version: 2019.03
Python version: 3.7.3
mlflow version: 1.0.0
Steps to Reproduce: https://mlflow.org/docs/latest/tutorial.html
Error at line/command: mlflow models serve -m [path_to_model] -p 1234
Error:
Command 'source activate mlflow-c4536834c2e6e0e2472b58bfb28dce35b4bd0be6 1>&2 && gunicorn --timeout 60 -b 127.0.0.1:1234 -w 4 mlflow.pyfunc.scoring_server.wsgi:app' returned non zero return code. Return code = 1
Terminal Log:
(mlflow) root#user:/home/user/mlflow/mlflow/examples/sklearn_elasticnet_wine/mlruns/0/e3dd02d5d84545ffab858db13ede7366/artifacts/model# mlflow models serve -m $(pwd) -p 1234
2019/06/18 16:15:16 INFO mlflow.models.cli: Selected backend for flavor 'python_function'
2019/06/18 16:15:17 INFO mlflow.pyfunc.backend: === Running command 'source activate mlflow-c4536834c2e6e0e2472b58bfb28dce35b4bd0be6 1>&2 && gunicorn --timeout 60 -b 127.0.0.1:1234 -w 4 mlflow.pyfunc.scoring_server.wsgi:app'
bash: activate: No such file or directory
Traceback (most recent call last):
File "/root/anaconda3/envs/mlflow/bin/mlflow", line 10, in <module>
sys.exit(cli())
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/mlflow/models/cli.py", line 43, in serve
host=host)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/mlflow/pyfunc/backend.py", line 76, in serve
command_env=command_env)
File "/root/anaconda3/envs/mlflow/lib/python3.7/site-packages/mlflow/pyfunc/backend.py", line 147, in _execute_in_conda_env
command, rc
Exception: Command 'source activate mlflow-c4536834c2e6e0e2472b58bfb28dce35b4bd0be6 1>&2 && gunicorn --timeout 60 -b 127.0.0.1:1234 -w 4 mlflow.pyfunc.scoring_server.wsgi:app' returned non zero return code. Return code = 1
(mlflow) root#user:/home/user/mlflow/mlflow/examples/sklearn_elasticnet_wine/mlruns/0/e3dd02d5d84545ffab858db13ede7366/artifacts/model#
Following the steps mentioned in the GitHub Issue 1507 (https://github.com/mlflow/mlflow/issues/1507) I was able to resolve this issue.
In reference to this post, the "anaconda/bin/" directory is never added to the list of environment variables i.e. PATH variable. In order to resolve this issue, add the "else" part of conda initialize code block from ~/.bashrc file to your PATH variable.
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/atulk/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/atulk/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/atulk/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/atulk/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
In this case, I added export PATH="/home/atulk/anaconda3/bin:$PATH" to the PATH variable. However, this is just a temporary fix until the issue is fixed in the project.
export PATH=$PATH:/path/to/python/Python/2.7/bin
can be used when you are not using anaconda