I tried to install PyLint. When installing I saw the following:
Collecting pylint
Downloading pylint-1.6.5-py2.py3-none-any.whl (577kB)
100% |████████████████████████████████| 583kB 655kB/s
Collecting six (from pylint)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting isort>=4.2.5 (from pylint)
Downloading isort-4.2.5-py2.py3-none-any.whl (40kB)
100% |████████████████████████████████| 40kB 737kB/s
Collecting mccabe (from pylint)
Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting configparser; python_version == "2.7" (from pylint)
Downloading configparser-3.5.0.tar.gz
Collecting backports.functools-lru-cache; python_version == "2.7" (from pylint)
Downloading backports.functools_lru_cache-1.3-py2.py3-none-any.whl
Collecting astroid<1.5.0,>=1.4.5 (from pylint)
Downloading astroid-1.4.9-py2.py3-none-any.whl (213kB)
100% |████████████████████████████████| 215kB 713kB/s
Collecting lazy-object-proxy (from astroid<1.5.0,>=1.4.5->pylint)
Downloading lazy-object-proxy-1.2.2.tar.gz
Collecting wrapt (from astroid<1.5.0,>=1.4.5->pylint)
Downloading wrapt-1.10.8.tar.gz
Building wheels for collected packages: configparser, lazy-object-proxy, wrapt
Running setup.py bdist_wheel for configparser ... done
Stored in directory: /Users/dkanesha/Library/Caches/pip/wheels/1c/bd/b4/277af3f6c40645661b4cd1c21df26aca0f2e1e9714a1d4cda8
Running setup.py bdist_wheel for lazy-object-proxy ... done
Stored in directory: /Users/dkanesha/Library/Caches/pip/wheels/06/d4/af/71508d0c69292f8c369ba3ae83cd85fabcd6956fd5709633b4
Running setup.py bdist_wheel for wrapt ... done
Stored in directory: /Users/dkanesha/Library/Caches/pip/wheels/19/8a/01/20cf74c3f38d49ef8e9b9aa7ffd38cefff79bad9f6f2c651f0
Successfully built configparser lazy-object-proxy wrapt
Installing collected packages: six, isort, mccabe, configparser, backports.functools-lru-cache, lazy-object-proxy, wrapt, astroid, pylint
Successfully installed astroid-1.4.9 backports.functools-lru-cache-1.3 configparser-3.5.0 isort-4.2.5 lazy-object-proxy-1.2.2 mccabe-0.6.1 pylint-1.6.5 six-1.10.0 wrapt-1.10.8
Can I uninstall the packages mentioned here Installing collected packages: six, isort, mccabe, configparser, backports.functools-lru-cache, lazy-object-proxy, wrapt, astroid, pylint to restore to the previous state, or could the "Installing collected packages" refer to packages previously installed too?
There are two useful packages to deal with it.
Use the package pip-autoremove to uninstall package and its dependencies. You can also use pipdeptree to display a tree relationship of all installed packages.
pip will pretty explicitly tell you what exactly it does. If required packages are already installed, they won't be listed in the "successfully installed" list and it will say "requirement already satisfied" instead. If a dependency was upgraded during the installation, it will explicitly say that it found a previous version, that it uninstalled the previous version and that it installed a new version.
So, yes, in your case it does not look like it upgraded any old packages and purely installed new packages, so uninstalling all those should revert you to your previous state.
Related
When building a script in a docker container I need to install external libraries. One of them fails:
Step 2/6 : RUN pip install paho-mqtt logbook arrow requests ics
---> Running in 93d9144d6224
(...)
ERROR: ics 0.5 has requirement arrow<0.12,>=0.11, but you'll have arrow 0.15.2 which is incompatible.
Installing collected packages: paho-mqtt, logbook, six, python-dateutil, arrow, chardet, certifi, urllib3, idna, requests, ics
Successfully installed arrow-0.15.2 certifi-2019.9.11 chardet-3.0.4 ics-0.5 idna-2.8 logbook-1.5.2 paho-mqtt-1.4.0 python-dateutil-2.8.0 requests-2.22.0 six-1.12.0 urllib3-1.25.5
I do not understand this error:
the versions seem to be OK: 0.15.2 >= 0.11
despite the error the installation is "successful"
In any case (weather the installation is successful or not) this error breaks the docker build.
The main question would be why the error is there in the first place?
The sub-questions:
how to fix it?
if the build is successful, how to force at least temporarily the docker build (this is a home setup)
The whole build log in case there are other useful information:
Step 1/6 : FROM python:3.7-alpine
---> 39fb80313465
Step 2/6 : RUN pip install paho-mqtt logbook arrow requests ics
---> Running in 93d9144d6224
Collecting paho-mqtt
Downloading https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904/paho-mqtt-1.4.0.tar.gz (88kB)
Collecting logbook
Downloading https://files.pythonhosted.org/packages/6b/3f/f4e6693791efacc1282852fba5392da0649b19416b37422c5489f79a52ea/Logbook-1.5.2.tar.gz (85kB)
Collecting arrow
Downloading https://files.pythonhosted.org/packages/cc/f5/f618f8423fe674a60461e58683edfeead93f4bbf95b9fca0e9699e765b35/arrow-0.15.2-py2.py3-none-any.whl (40kB)
Collecting requests
Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
Collecting ics
Downloading https://files.pythonhosted.org/packages/3a/66/7844baa915da9a76ef7b7b6d93935cc1474688c6ea914b90dbe54d6f6f41/ics-0.5-py2.py3-none-any.whl
Collecting python-dateutil (from arrow)
Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting certifi>=2017.4.17 (from requests)
Downloading https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl (154kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests)
Downloading https://files.pythonhosted.org/packages/81/b7/cef47224900ca67078ed6e2db51342796007433ad38329558f56a15255f5/urllib3-1.25.5-py2.py3-none-any.whl (125kB)
Collecting idna<2.9,>=2.5 (from requests)
Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
Collecting six>1.5 (from ics)
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Building wheels for collected packages: paho-mqtt, logbook
Building wheel for paho-mqtt (setup.py): started
Building wheel for paho-mqtt (setup.py): finished with status 'done'
Created wheel for paho-mqtt: filename=paho_mqtt-1.4.0-cp37-none-any.whl size=48332 sha256=56275b1fa3496506436d27287c83cde7c59ec350292f87edd45f0248f8ef46e5
Stored in directory: /root/.cache/pip/wheels/82/e5/de/d90d0f397648a1b58ffeea1b5742ac8c77f71fd43b550fa5a5
Building wheel for logbook (setup.py): started
Building wheel for logbook (setup.py): finished with status 'done'
Created wheel for logbook: filename=Logbook-1.5.2-cp37-cp37m-linux_x86_64.whl size=66345 sha256=1a1f099a9baeaab15f43814c6506f3fc640c49add0fb8fafeb93397de9cd34b6
Stored in directory: /root/.cache/pip/wheels/c7/d6/22/9f6bd2884a48b215fdd9cbfa78671b51f4470dfd3d14ef701a
Successfully built paho-mqtt logbook
ERROR: ics 0.5 has requirement arrow<0.12,>=0.11, but you'll have arrow 0.15.2 which is incompatible.
Installing collected packages: paho-mqtt, logbook, six, python-dateutil, arrow, chardet, certifi, urllib3, idna, requests, ics
Successfully installed arrow-0.15.2 certifi-2019.9.11 chardet-3.0.4 ics-0.5 idna-2.8 logbook-1.5.2 paho-mqtt-1.4.0 python-dateutil-2.8.0 requests-2.22.0 six-1.12.0 urllib3-1.25.5
Removing intermediate container 93d9144d6224
---> 7a3f016d1374
Without seeing your Dockerfile we can't really see what you are doing; but
pip install arrow==0.11
instead of pip install arrow should fix the immediate problem.
If the commands in your RUN statements are separated with && you can change that to ; after the command whose error you want to ignore, and you can add || true at the end to make the entire RUN statement always succeed; but this is generally poor practice, and in this case, it's unlikely to produce a useful image anyway.
You have a module named ics which has dependency on the arrow module with version <0.12,>=0.11, these versions of the dependencies are specified when you build a python module. While building your docker image it is using arrow 0.15.2 from the cache, since it might be already installed on your computer.
Best way to deal with these types of errors is to define all your dependencies with their versions in a requirements.txt file and run pip install -r requirements.txt to install all in one go.
I can't say for sure why your build is failing though. You can try to uninstall the arrow module and reinstall the specified version.
I am part of a small team that is trying to install Python's 'fancyimpute' package. Three of us have different Windows machines. One of us has Mac.
fancyimpute's page says: 'Operating System :: OS Independent'.
My teammate has no problems installing it on his Mac: pip install fancyimpute works as it should.
When we, Windows users, try to do the same, we are getting this error:
"error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools"
One we've installed "Visual C++ 2015 Build Tools", we still can't install fancyimpute. The error we are getting is as following:
'NAN'
ecos/src/ecos.c(1093): warning C4013: '_set_output_format' undefined; assuming extern returning int
ecos/src/ecos.c(1093): error C2065: '_TWO_DIGIT_EXPONENT': undeclared identifier
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Failed building wheel for ecos
Is it possible that it's a hopeless case for Windows machine owners? Or is there a solution?
I have just installed fancyimpute on windows 10 machine and it was successful. Can you please try running pip command from command prompt in case if you're doing it from pycharm console.
C:\Users\USER>pip install fancyimpute
Collecting fancyimpute
Downloading fancyimpute-0.2.0.tar.gz
Requirement already satisfied: six in c:\python27\lib\site-packages (from fancyimpute)
Collecting knnimpute (from fancyimpute)
Downloading knnimpute-0.1.0.tar.gz
Requirement already satisfied: numpy>=1.10 in c:\python27\lib\site-packages (from fancyimpute)
Requirement already satisfied: scipy in c:\python27\lib\site-packages (from fancyimpute)
Collecting cvxpy (from fancyimpute)
Downloading cvxpy-0.4.11-py2-none-any.whl (379kB)
100% |################################| 389kB 439kB/s
Requirement already satisfied: scikit-learn>=0.17.1 in c:\python27\lib\site-packages (from fancyimpute)
Collecting downhill (from fancyimpute)
Downloading downhill-0.4.0-py2.py3-none-any.whl
Collecting climate (from fancyimpute)
Downloading climate-0.4.6.tar.gz
Collecting theano (from fancyimpute)
Downloading Theano-0.9.0.tar.gz (3.1MB)
100% |################################| 3.1MB 65kB/s
Collecting ecos>=2 (from cvxpy->fancyimpute)
Downloading ecos-2.0.4-cp27-none-win32.whl (44kB)
100% |################################| 51kB 96kB/s
Collecting CVXcanon>=0.0.22 (from cvxpy->fancyimpute)
Downloading CVXcanon-0.1.1.tar.gz (694kB)
100% |################################| 696kB 105kB/s
Requirement already satisfied: toolz in c:\python27\lib\site-packages (from cvxpy->fancyimpute)
Collecting fastcache (from cvxpy->fancyimpute)
Downloading fastcache-1.0.2.tar.gz
Collecting multiprocess (from cvxpy->fancyimpute)
Downloading multiprocess-0.70.5.zip (1.5MB)
100% |################################| 1.5MB 73kB/s
Collecting scs>=1.1.3 (from cvxpy->fancyimpute)
Downloading scs-1.2.7.tar.gz (280kB)
100% |################################| 286kB 107kB/s
Requirement already satisfied: click in c:\python27\lib\site-packages (from downhill->fancyimpute)
Collecting plac (from climate->fancyimpute)
Downloading plac-0.9.6-py2.py3-none-any.whl
Collecting dill>=0.2.6 (from multiprocess->cvxpy->fancyimpute)
Downloading dill-0.2.7.1.tar.gz (64kB)
100% |################################| 71kB 109kB/s
Collecting pyreadline>=1.7.1 (from dill>=0.2.6->multiprocess->cvxpy->fancyimpute)
Downloading pyreadline-2.1.zip (109kB)
100% |################################| 112kB 127kB/s
Building wheels for collected packages: fancyimpute, knnimpute, climate, theano, CVXcanon, fastcache, multiprocess, scs, dill, pyreadline
Running setup.py bdist_wheel for fancyimpute ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\46\9d\78\a49d65bb66557f705de636d1a21f9310993a4342670add3f9e
Running setup.py bdist_wheel for knnimpute ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\66\a0\1c\ed41cf540d0bd6d4ae368e9554b77753da154e7d8974c4435f
Running setup.py bdist_wheel for climate ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\90\1f\17\51ca46dd7c3b0be854c63468b50b3d24c443d149244cc4bb19
Running setup.py bdist_wheel for theano ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\d5\5b\93\433299b86e3e9b25f0f600e4e4ebf18e38eb7534ea518eba13
Running setup.py bdist_wheel for CVXcanon ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\1b\f6\dd\14f66c64621bddd6b92a3cfc995fa2a21b134fcf4122402b30
Running setup.py bdist_wheel for fastcache ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\1b\ce\51\0614c8aaab5c0893ed5a2098a15673a4949cba59cfa04ceace
Running setup.py bdist_wheel for multiprocess ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\28\ef\9f\5cc70b5d92fc4641b68dc23b3583f2b6ec1d153cb71985aeaf
Running setup.py bdist_wheel for scs ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\de\bb\5c\5efaf95dbe8b2a87650a9a1061aeefcd5b16353b98afbac789
Running setup.py bdist_wheel for dill ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\e5\88\fe\7e290ce5bb39d531eb9bee5cf254ba1c3e3c7ba3339ce67bee
Running setup.py bdist_wheel for pyreadline ... done
Stored in directory: C:\Users\USER\AppData\Local\pip\Cache\wheels\9a\c7\45\fd424eb3d7875d7a61221accd593e17c7953ed5ece5ee60be9
Successfully built fancyimpute knnimpute climate theano CVXcanon fastcache multiprocess scs dill pyreadline
Installing collected packages: knnimpute, ecos, CVXcanon, fastcache, pyreadline, dill, multiprocess, scs, cvxpy, theano, downhill, plac, climate, fancyimpute
Successfully installed CVXcanon-0.1.1 climate-0.4.6 cvxpy-0.4.11 dill-0.2.7.1 downhill-0.4.0 ecos-2.0.4 fancyimpute-0.2.0 fastcache-1.0.2 knnimpute-0.1.0 multiprocess-0.70.5 plac-0.9.6 pyreadline-2.1 scs-1.2.7 theano-0.9.0
I found the solution here: Fancyimpute pip install error
Solved the problem by manually downloading the appropriate .whl file (Python version and Windows architecture): Windows binaries
Navigated to the downloaded file (in terminal) and ran pip install filename.whl.
when i run
pip install twisted
in the command line in windows, it starts installing packages until the flowing line comes up.
failed building wheel for twisted
pip then crashed soon after, saying it has failed the installation.
why is this ?
is there a way round it to install twisted?
my wheel version is 0.29, windows 10. twisted installs fine on python 2.7
thanks
I meet similar problem like yours.You can try to install the Twisted whit wheels
but at first,you should install the wheels
pip install wheels
then,download an appropriate version from this
website:http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
you can get xxxx.whl file
use
pip install xxxx/xxxxxx.whl
Finished!
Basically, that is not a programming question (I feel it might as well fit well into https://superuser.com/ or https://serverfault.com/).
Could you please provide a tad more information?
What OS are you running? What version?
For comparison, I'm running Debian GNU/Linux (testing), and
pip3 install twisted
performs fine:
collecting twisted
Using cached Twisted-17.1.0.tar.bz2
Collecting zope.interface>=4.0.2 (from twisted)
Using cached zope.interface-4.3.3.tar.gz
Collecting constantly>=15.1 (from twisted)
Downloading constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted)
Downloading incremental-16.10.1-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted)
Using cached Automat-0.5.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /usr/local/lib/python3.5/dist-packages (from zope.interface>=4.0.2->twisted)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from Automat>=0.3.0->twisted)
Collecting attrs (from Automat>=0.3.0->twisted)
Using cached attrs-16.3.0-py2.py3-none-any.whl
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python3.5/dist-packages (from setuptools->zope.interface>=4.0.2->twisted)
Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python3.5/dist-packages (from setuptools->zope.interface>=4.0.2->twisted)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.5/dist-packages (from packaging>=16.8->setuptools->zope.interface>=4.0.2->twisted)
Building wheels for collected packages: twisted, zope.interface
Running setup.py bdist_wheel for twisted ... done
Stored in directory: /root/.cache/pip/wheels/65/e3/44/cd3da92c03926aabc80e658e11d6e64619abce3ef44c1c34df
Running setup.py bdist_wheel for zope.interface ... done
Stored in directory: /root/.cache/pip/wheels/00/aa/8b/f1d1eb398423e59894b45ee151344e243808156c2d182c9f4e
Successfully built twisted zope.interface
Installing collected packages: zope.interface, constantly, incremental, attrs, Automat, twisted
Successfully installed Automat-0.5.0 attrs-16.3.0 constantly-15.1.0 incremental-16.10.1 twisted-17.1.0 zope.interface-4.3.3
I must admit, this install was done outside of virtualenv.
Did you try installing twisted outside your virtualenv?
Trying to follow a screencast to install DjangoCMS:
$ mkvirtualenv modern_business
$ pip install djangocms
and got an error:
I am using python 2.7. Any idea?
Looks like you need to install django cms installer:
(.envtest)$ pip install djangocms-installer
Collecting djangocms-installer
Downloading djangocms_installer-0.9.3-py2.py3-none-any.whl (57kB)
100% |████████████████████████████████| 61kB 628kB/s
Collecting argparse (from djangocms-installer)
Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting dj-database-url>=0.4 (from djangocms-installer)
Downloading dj-database-url-0.4.1.tar.gz
Successfully built dj-database-url tzlocal
.....
.....
Installing collected packages: argparse, dj-database-url, six, pytz, tzlocal, djangocms-installer
Successfully installed argparse-1.4.0 dj-database-url-0.4.1 djangocms-installer-0.9.3 pytz-2016.7 six-1.10.0 tzlocal-1.3
As per the doc here: http://docs.django-cms.org/en/release-3.4.x/introduction/install.html
We are trying to install OpenStack Services. We have created the virtual environment and installed Pip as well. Pip version is 8.1.1. Now when we try to install keystone we getting the error with dependency package as below:
/tmp/openstack-venv-builder/venvs/horizon/bin/pip install --timeout 120 --find-links /var/www/repo/os-releases/liberty --no-index --log /var/log/repo/repo_venv_builder.log keystone
Ignoring indexes: http://pypi.python.org/simple
Collecting keystone
Collecting oslo.i18n<1.6.0,>=1.5.0 (from keystone)
Could not find a version that satisfies the requirement oslo.i18n<1.6.0,>=1.5.0 (from keystone) (from versions: 3.1.0)
No matching distribution found for oslo.i18n<1.6.0,>=1.5.0 (from keystone)
Installation on oslo.i18n looks fine.
/tmp/openstack-venv-builder/venvs/horizon/bin/pip install --timeout 120 --find-links /var/www/repo/os-releases/liberty --no-index --log /var/log/repo/repo_venv_builder.log oslo.i18n
Ignoring indexes: http://pypi.python.org/simple
Collecting oslo.i18n
Collecting pbr>=1.6 (from oslo.i18n)
Collecting Babel>=1.3 (from oslo.i18n)
Collecting six>=1.9.0 (from oslo.i18n)
Collecting pytz>=0a (from Babel>=1.3->oslo.i18n)
Installing collected packages: pbr, pytz, Babel, six, oslo.i18n
Successfully installed Babel-2.1.1 oslo.i18n-3.1.0 pbr-1.8.1 pytz-2015.7 six-1.10.0
Even then we are getting error while installing keystone. Please help.