I'm facing a problem with Poetry and GitHub actions in the last days. Maybe because Poetry has an updated version.
Information
Poetry version 1.1.9
I'm using the following .yml file for the CICD
jobs:
execute-linters:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout#v2
- name: Pyton 3.9
uses: actions/setup-python#v2
with:
python-version: 3.9
- name: Poetry
uses: Gr1N/setup-poetry#v7
- name: Dependencies
run: poetry install
...
Whenever it runs, during the Dependencies job, it fails and I've got the following error
• Installing py (1.10.0)
EnvCommandError
Command ['/home/runner/work/ds-gdem-pvso/ds-gdem-pvso/.venv/bin/pip', 'install', '--no-deps', '/home/runner/.cache/pypoetry/artifacts/c8/3a/b1/6d8182aff6a688801f32ca473f2ba55ecb83446a84cf3d1afad18800e0/ibm_db-3.0.4.tar.gz'] errored with the following return code 1, and output:
Processing /home/runner/.cache/pypoetry/artifacts/c8/3a/b1/6d8182aff6a688801f32ca473f2ba55ecb83446a84cf3d1afad18800e0/ibm_db-3.0.4.tar.gz
ERROR: Command errored out with exit status 1:
command: /home/runner/work/ds-gdem-pvso/ds-gdem-pvso/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-c_nfk704/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-c_nfk704/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-9hi5cw5y
cwd: /tmp/pip-req-build-c_nfk704/
Complete output (3 lines):
Detected 64-bit Python
Downloading https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz
error in ibm_db setup command: use_2to3 is invalid.
----------------------------------------
WARNING: Discarding file:///home/runner/.cache/pypoetry/artifacts/c8/3a/b1/6d8182aff6a688801f32ca473f2ba55ecb83446a84cf3d1afad18800e0/ibm_db-3.0.4.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/utils/env.py:1180 in _run
1176│ output = subprocess.check_output(
1177│ cmd, stderr=subprocess.STDOUT, **kwargs
1178│ )
1179│ except CalledProcessError as e:
→ 1180│ raise EnvCommandError(e, input=input_)
1181│
1182│ return decode(output)
1183│
1184│ def execute(self, bin, *args, **kwargs):
• Installing pyarrow (4.0.1)
• Installing regex (2021.8.28)
• Installing scikit-learn (0.24.2)
• Installing toml (0.10.2)
• Installing tomli (1.2.1)
• Installing tqdm (4.62.3)
• Installing typing-inspect (0.7.1)
• Installing wrapt (1.12.1)
Error: Process completed with exit code 1.
Attempts
At first I was using the Gr1N/setup-poetry#v4 and I notice that it was outdated. I've tried to update it to Gr1N/setup-poetry#v7, but didn't work.
I also received this Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.. I've tried to delete poetry.lock and run poetry update to generate a new one, no success at all.
Could anyone try to help me?
I think you can pin the poetry version link to what you have in your local environment (use poetry --version) to fix that.
- uses: Gr1N/setup-poetry#v7
with:
poetry-version: 1.1.7
It is always a good practice to pin down your libraries and make sure your local environment is as similar as possible to the deployment environment.
Related
im trying to pip install ngrok but i got the error.
i use ubuntu server
I haven't been able to solve it for hours :(
please help me
pip install ngrok
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Collecting ngrok
Using cached ngrok-0.1.6.tar.gz (3.5 kB)
Collecting ping
Using cached ping-0.2.tar.gz (10 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qanhr0lu/ping/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qanhr0lu/ping/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-qanhr0lu/ping/pip-egg-info
cwd: /tmp/pip-install-qanhr0lu/ping/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qanhr0lu/ping/setup.py", line 23, in <module>
from ping import __version__
File "/tmp/pip-install-qanhr0lu/ping/ping.py", line 196
except socket.error, (errno, msg):
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm not sure which python ngrok library you are trying to install, but I suspect it's probably pyngrok which is installed using: pip install pyngrok
source: https://pyngrok.readthedocs.io/en/latest/index.html
Im trying to set up a CI for a R package. In that regard I`m considering circleCI, which has worked out with previous R projects. However this time, I get the following error:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
devtools::install_deps(dependencies = TRUE)
Error in loadNamespace(x) : there is no package called ‘devtools’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
My .circleci/config.yml looks similar to that one
version: 2
jobs:
build:
docker:
- image: my_random_image
steps:
- checkout
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
- run:
name: Build package
command: R CMD build .
- run:
name: Check package
command: R CMD check *tar.gz
and my_random_image looks as follows:
FROM r-base:4.1.2
RUN apt-get update \
&& apt-get install git libssl-dev ssh texlive-latex-base texlive-fonts-recommended
libcurl4-openssl-dev libxml2-dev -y \
&& rm -rf /var/lib/apt/lists/*
RUN R -e "install.packages(c('devtools', 'roxygen2'), repos='http://cran.us.r- project.org')"
So its pretty standard stuff, as far as I can see. The error only occurs if renv is part if my R package. Otherwise circleCI does not complain and runs as expected without any errors.
I would like to keep renv in my R project and therefore struggle to understand the issue and the solution to that.
appreciate any help!!
The issue here is most likely that your run stage, here:
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
installs packages into the default user / site libraries, but when R is launched in your project's working directory:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
the renv autoloader is automatically downloading renv, and activating the renv project library.
By default, renv isolates projects from the user / site library, so the packages installed in your earlier steps are not visible within the project. This behavior is intentional, and ensures that different project libraries are isolated both from changes in the user / site libraries, as well as in other project libraries.
One of the following should help:
If your renv.lock is up to date, call renv::restore() before trying to use devtools or other packages;
Allow renv to see the user library, with e.g. the environment variable RENV_CONFIG_USER_LIBRARY = TRUE.
I'd recommend reading https://rstudio.github.io/renv/articles/renv.html and https://rstudio.github.io/renv/articles/ci.html if you haven't already.
I Tryed to install Robotframework browser (win10 enviroment).
Nodejs installation goes ok. But in "pip install robotframework-browser" After this step installation exits with statuscode 1:
Installing collected packages: grpcio, wrapt, typing-extensions, robotframework-pythonlibcore, robotframework-assertion-engine, overrides, grpcio-tools, backports.cached-property, robotframework-browser
Running setup.py install for grpcio ... error
ERROR: Command errored out with exit status 1:
ERROR: Command errored out with exit status 1: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\x\AppData\Local\Temp\pip-install-h6_hezr8\grpcio_55999491d4194df7ab59a8dcd0fe4e6e\setup.py'"'"'; file='"'"'C:\Users\x\AppData\Local\Temp\pip-install-h6_hezr8\grpcio_55999491d4194df7ab59a8dcd0fe4e6e\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'"'"'))' install --record 'C:\Users\x\AppData\Local\Temp\pip-record-agotwqfa\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\grpcio' Check the logs for full command output.
Any ideas how to fix it
Check if the library is compatible with Python 3.10.
Try a lower version of Python.
Newbie trying to get going with IJulia on Debian Jessie, and am stuck with an error. Don't know how to interpret the message, and not actually sure on what to do next.
The beginning is all ok :
julia> Pkg.init()
INFO: Initializing package repository /home/sybs/.julia/v0.3
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
julia> Pkg.add("IJulia")
INFO: Cloning cache of BinDeps from git://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of Compat from git://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Conda from git://github.com/Luthaf/Conda.jl.git
INFO: Cloning cache of Dates from git://github.com/quinnj/Dates.jl.git
INFO: Cloning cache of HttpCommon from git://github.com/JuliaWeb/HttpCommon.jl.git
INFO: Cloning cache of IJulia from git://github.com/JuliaLang/IJulia.jl.git
INFO: Cloning cache of JSON from git://github.com/JuliaLang/JSON.jl.git
INFO: Cloning cache of Nettle from git://github.com/staticfloat/Nettle.jl.git
INFO: Cloning cache of SHA from git://github.com/staticfloat/SHA.jl.git
INFO: Cloning cache of URIParser from git://github.com/JuliaWeb/URIParser.jl.git
INFO: Cloning cache of ZMQ from git://github.com/JuliaLang/ZMQ.jl.git
INFO: Installing BinDeps v0.3.21
INFO: Installing Compat v0.7.11
INFO: Installing Conda v0.1.9
INFO: Installing Dates v0.3.2
INFO: Installing HttpCommon v0.1.2
INFO: Installing IJulia v1.1.8
INFO: Installing JSON v0.5.0
INFO: Installing Nettle v0.2.2
INFO: Installing SHA v0.1.2
INFO: Installing URIParser v0.0.7
INFO: Installing ZMQ v0.3.1
INFO: Building Nettle
INFO: Building ZMQ
INFO: Building IJulia
INFO: Installing Jupyter via the Conda package.
INFO: Downloading miniconda installer ...
--2016-02-23 14:43:46-- http://repo.continuum.io/miniconda/Miniconda-3.9.1-Linux-x86_64.sh
Résolution de repo.continuum.io (repo.continuum.io)… 23.21.205.0, 174.129.25.1
Connexion à repo.continuum.io (repo.continuum.io)|23.21.205.0|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 23531867 (22M) [application/octet-stream]
Sauvegarde en : « /home/sybs/.julia/v0.3/Conda/deps/usr/installer.sh »
home/sybs/.julia/v0. 48%[=========> ] 10,86M 16,4KB/s eta 14m 14s/home/sybs/.julia/v 100%[=====================>] 22,44M 13,8KB/s ds 29m 43ss
Then I get a "chmod not defined" error :
INFO: Installing miniconda ...
===============================[ ERROR: IJulia ]================================
chmod not defined
while loading /home/sybs/.julia/v0.3/IJulia/deps/build.jl, in expression starting on line 35
================================================================================
================================[ BUILD ERRORS ]================================
WARNING: IJulia had build errors.
- packages with build errors remain installed in /home/sybs/.julia/v0.3
- build a package and all its dependencies with `Pkg.build(pkg)`
- build a single package by running its `deps/build.jl` script
================================================================================
INFO: Package database updated
I opened up the build.jl file and scroll before and after line35 and got this :
if jupyter_vers < v"3.0" || dirname(jupyter) == abspath(Conda.SCRIPTDIR)
info("Installing Jupyter via the Conda package.")
Conda.add("jupyter")
jupyter = abspath(Conda.SCRIPTDIR,"jupyter")
jupyter_vers = prog_version(jupyter)
jupyter_vers < v"3.0" && error("failed to find $jupyter 3.0 or later")
end
info("Found Jupyter version $jupyter_vers: $jupyter")
#######################################################################
# Warn people upgrading from older IJulia versions:
try
juliaprof = chomp(readall(pipeline(`$ipython locate profile julia`,
stderr=DevNull)))
warn("""You should now run IJulia just via `$jupyter notebook`, without
the `--profile julia` flag. IJulia no longer maintains the profile.
Consider deleting $juliaprof""")
end
#######################################################################
# Install Jupyter kernel-spec file.
So, what shall I do next ? chmod a+x build.jl ? then Pkg.build("IJulia") ?
Conda.jl author here. I do not have enough reputation to comment, so here is an answer.
Conda is tested on the latest julia 0.3, which is 0.3.12, and works there. So a possible fix would be to update your Julia version to either that or 0.4.
You can also try to install it manually, by making it executable and then running ./installer.sh -b -f -p $HOME/.julia/v0.3/Conda/deps/usr/.
If I install the latest stable 1.2.7 django-haystack with sudo pip install django-haystack, it works fine. But after uninstalling it and installing the very latest dev version 2.0.0 BETA instead as suggested on the main page:
pip install -e git+https://github.com/toastdriven/django-haystack.git#master#egg=django-haystack
Despite the success messages below, it seems like it is not properly installed:
Obtaining django-haystack from git+https://github.com/toastdriven/django-haystack.git#master#egg=django-haystack
Cloning https://github.com/toastdriven/django-haystack.git (to master) to ./src/django-haystack
Running setup.py egg_info for package django-haystack
Installing collected packages: django-haystack
Running setup.py develop for django-haystack
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
Creating /usr/local/lib/python2.7/dist-packages/django-haystack.egg-link (link to .)
Adding django-haystack 2.0.0-beta to easy-install.pth file
Installed /home/kave/projects/cb/src/django-haystack
Successfully installed django-haystack
Cleaning up...
because when I go into the django shell environment and do a
>>> from haystack import indexes
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named haystack
I have followed the instructions and have
INSTALLED_APPS = (... 'haystack',) in there
I had this problem before, but could never solve it. sudo pip install default works fine, but as long as I get the latest Git version, my django doesn't seem to see it.
What could I be missing?
Many Thanks for your advice,
UPDATE
Apologies, but it seems the error is happening only within Aptana Studio 3.0. In Django Shell I can do the import after all. I am still dazzled, as this should be the same. Why can Aptana see the libraries when installing with sudo pip install django-haystack but not if using latest Git version? What could go wrong there please?
UPDATE 2
full sys.path
['/home/kaveh/projects/cb', '/usr/local/lib/python2.7/dist-packages/requests-0.13.9-py2.7.egg', '/home/kaveh/projects/cb/src/django-haystack', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
I finally got it working.
As I said the problem is pip install -e git+https://github.com/toastdriven/django-haystack.git#master#egg=django-haystack is apparently not working.
I simply uninstalled it and made sure its deleted.
Then I simply downloaded the source as zip file, extracted it and
python setup.py build
sudo python setup.py install
This way it will guaranteed be working. Hope this helps someone.