I have installed Raspbian Jessi with Seafile, which is dependent on python2.7, installed as part of this process by myself. It was working fine for weeks when it was in headless mode. After running manually via ssh
sudo apt-get update && sudo apt-get upgrade
the update process fails with a configuration error of python2.7-minimal. the output was:
sudo apt-get install python2.7 python2.7-minimal
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libpython-stdlib
Use 'apt-get autoremove' to remove it.
Suggested packages:
python2.7-doc binfmt-support
The following NEW packages will be installed:
python2.7 python2.7-minimal
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/1,402 kB of archives.
After this operation, 3,595 kB of additional disk space will be used.
y
Selecting previously unselected package python2.7-minimal.
(Reading database ... 107629 files and directories currently installed.)
Preparing to unpack .../python2.7-minimal_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7-minimal (2.7.9-2+deb8u1) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7 (2.7.9-2+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Setting up python2.7-minimal (2.7.9-2+deb8u1) ...
Sorry: TypeError: compile() expected string without null bytesdpkg: error processing package python2.7-minimal (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python2.7:
python2.7 depends on python2.7-minimal (= 2.7.9-2+deb8u1); however:
Package python2.7-minimal is not configured yet.
dpkg: error processing package python2.7 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python2.7-minimal
python2.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried several combinations of apt-get remove/purge, dpkg reconfigure etc but the error is persistent.
Another thing:
apt-cache policy python2.7-minimal python2.7
python2.7-minimal:
Installed: 2.7.9-2+deb8u1
Candidate: 2.7.9-2+deb8u1
Version table:
*** 2.7.9-2+deb8u1 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
100 /var/lib/dpkg/status
python2.7:
Installed: 2.7.9-2+deb8u1
Candidate: 2.7.9-2+deb8u1
Version table:
*** 2.7.9-2+deb8u1 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
100 /var/lib/dpkg/status
I am not a beginner but also not an expert with Linux in general. Tell me if you need any further information to answer this question. Please help because I am tired of fighting stuff like this.
According to this post on ServerFault and this blog, it seems likely that there is something wrong with your local files (corruption, mis-configuration, etc). You said that you tried purging the packages, but since I'm not sure exactly what you tried, I would suggest purging all python packages with sudo apt purge python*, and then reinstalling them as necessary.
It is worth noting for anybody not aware that apt purge will completely uninstall a package, including configuration files. So don't do this unless you understand the risk.
Related
I'm new to django. i am tring to implement python3-saml which requires Xmlsec. i am trying to install it Using "pip install xmlsec" on my virtal environment. but throwing this error.
Collecting xmlsec
Using cached xmlsec-1.3.12.tar.gz (64 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: lxml>=3.8 in
/opt/anaconda3/envs/conda_saml_env/lib/python3.10/site-packages (from xmlsec)
(4.8.0)
Building wheels for collected packages: xmlsec
Building wheel for xmlsec (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for xmlsec (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running bdist_wheel
running build
running build_py
package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
creating build
creating build/lib.macosx-10.9-x86_64-3.10
creating build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/py.typed -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/tree.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/__init__.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/constants.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/template.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
running build_ext
error: xmlsec1 is not installed or not in path.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with
pip.
ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec, which is required to install
pyproject.toml-based projects
I tried the following
brew install libxml2 libxmlsec1 pkg-config
Output for above command is
Warning: libxml2 2.9.12 is already installed and up-to-date.
To reinstall 2.9.12, run:
brew reinstall libxml2
Warning: libxmlsec1 1.2.33 is already installed and up-to-date.
To reinstall 1.2.33, run:
brew reinstall libxmlsec1
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
brew reinstall pkg-config
I got the same issue when i tried on Linux OS. Then i was able to solve this by running this command
sudo apt-get install libxmlsec1-dev
But i'm not able to run this command on my Mac. Is there anything i'm missing.
Use these Commands :
xcode-select --install
brew upgrade
brew install libxml2 libxmlsec1
pip install xmlsec
I am trying to install ipykernel in a separate python 2.7 environment (py27) for use of jupyter notebook. My base environment uses python3.9 that works great. When trying to use conda install ipykernel, I get the error below. Yes, this was done in a separate environment from my base and I am not aware of any virus softwares that are impeding this from successfully completing. Those are the only answers that I've seemed to find online. I also tried reinstalling anaconda. I did not attach the output from conda install -v ipykernel, but saw an error saying invalid syntax in decorator.py on line 162. It was pointing to the file=stderr in a print function call.
Similar to this problem https://github.com/conda/conda/issues/7351, but was unable to solve the problem with the suggestions.
(py27) C:\Users\Heath>conda install ipykernel
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Users\Heath\anaconda3\envs\py27
added / updated specs:
- ipykernel
The following NEW packages will be INSTALLED:
backports pkgs/main/noarch::backports-1.0-pyhd3eb1b0_2
backports.shutil_~ pkgs/main/noarch::backports.shutil_get_terminal_size-1.0.0-pyhd3eb1b0_3
backports_abc pkgs/main/noarch::backports_abc-0.5-py_1
colorama pkgs/main/noarch::colorama-0.4.4-pyhd3eb1b0_0
decorator pkgs/main/noarch::decorator-5.1.0-pyhd3eb1b0_0
enum34 pkgs/main/win-64::enum34-1.1.6-py27_1
futures pkgs/main/win-64::futures-3.3.0-py27_0
ipykernel pkgs/main/win-64::ipykernel-4.10.0-py27_0
ipython pkgs/main/win-64::ipython-5.8.0-py27_0
ipython_genutils pkgs/main/noarch::ipython_genutils-0.2.0-pyhd3eb1b0_1
jupyter_client pkgs/main/win-64::jupyter_client-5.3.4-py27_0
jupyter_core pkgs/main/win-64::jupyter_core-4.6.1-py27_0
libsodium pkgs/main/win-64::libsodium-1.0.16-h8b3e59e_0
pathlib2 pkgs/main/win-64::pathlib2-2.3.5-py27_0
pickleshare pkgs/main/win-64::pickleshare-0.7.5-py27_0
prompt_toolkit pkgs/main/win-64::prompt_toolkit-1.0.15-py27h3a8ec6a_0
pygments pkgs/main/noarch::pygments-2.5.2-py_0
python-dateutil pkgs/main/noarch::python-dateutil-2.8.2-pyhd3eb1b0_0
pywin32 pkgs/main/win-64::pywin32-227-py27h0c8e037_1
pyzmq pkgs/main/win-64::pyzmq-18.1.0-py27hc56fc5f_0
scandir pkgs/main/noarch::scandir-1.10.0-pyh5d7bf9c_3
simplegeneric pkgs/main/win-64::simplegeneric-0.8.1-py27_2
singledispatch pkgs/main/noarch::singledispatch-3.7.0-pyhd3eb1b0_1001
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_0
tornado pkgs/main/win-64::tornado-5.1.1-py27h0c8e037_0
traitlets pkgs/main/win-64::traitlets-4.3.3-py27_0
wcwidth pkgs/main/noarch::wcwidth-0.2.5-pyhd3eb1b0_0
win_unicode_conso~ pkgs/main/win-64::win_unicode_console-0.5-py27hc037021_0
zeromq pkgs/main/win-64::zeromq-4.3.1-h2880e7c_3
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::ipykernel-4.10.0-py27_0'.
Rolling back transaction: done
LinkError: post-link script failed for package defaults::ipykernel-4.10.0-py27_0
location of failed script: C:\Users\Heath\anaconda3\envs\py27\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>
==> script output <==
stdout:
stderr:
return code: 1
()```
How can I install both of them on CentOS 7? They both depend on each other. The machine is not connected to the internet.
[efe#localhost Desktop]$ sudo rpm -i glibc-2.17-317.el7.x86_64.rpm
warning: glibc-2.17-317.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
glibc-common = 2.17-317.el7 is needed by glibc-2.17-317.el7.x86_64
[efe#localhost Desktop]$ sudo rpm -i glibc-common-2.17-317.el7.x86_64.rpm
warning: glibc-common-2.17-317.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
glibc = 2.17-317.el7 is needed by glibc-common-2.17-317.el7.x86_64
EDIT1: I have installed 2.17-292 for everything on x86_64 and it is successful. However, for i686 (yes, I need both unfortunately) I have tried to combine all packages into single command, lots of other dependencies appeared. I have tried to install 2.17-292 like I did for x86_64, this is the final output with errors. Before this last command, dependency errors appeared all the time, this is the first different error.
[efe#localhost packages]$ sudo rpm -i glibc-2.17-292.el7.i686.rpm glibc-common-2.17-292.el7.i686.rpm glibc-headers-2.17-292.el7.i686.rpm glibc-devel-2.17-292.el7.i686.rpm nss-softokn-freebl-3.44.0-8.el7_7.i686.rpm nspr-4.25.0-2.el7_9.i686.rpm nss-util-3.53.1-1.el7_9.i686.rpm libselinux-2.5-15.el7.i686.rpm libsepol-2.5-10.el7.i686.rpm pcre-8.32-17.el7.i686.rpm libgcc-4.8.5-44.el7.i686.rpm libstdc++-4.8.5-44.el7.i686.rpm
warning: glibc-2.17-292.el7.i686.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
file /usr/bin/ldd from install of glibc-common-2.17-292.el7.i686 conflicts with file from package glibc-common-2.17-292.el7.x86_64
file /usr/lib/locale/locale-archive.tmpl from install of glibc-common-2.17-292.el7.i686 conflicts with file from package glibc-common-2.17-292.el7.x86_64
file /usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.pyc from install of libstdc++-4.8.5-44.el7.i686 conflicts with file from package libstdc++-4.8.5-36.el7.x86_64
file /usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.pyo from install of libstdc++-4.8.5-44.el7.i686 conflicts with file from package libstdc++-4.8.5-36.el7.x86_64
EDIT2: I have entered a command as suggested by Florian Weimer.
[efe#localhost i686]$ sudo yum update *.rpm
Loaded plugins: fastestmirror, langpacks
Examining glibc-2.17-292.el7.i686.rpm: glibc-2.17-292.el7.i686
Package glibc.i686 not installed, cannot update it. Run yum install to install it instead.
Examining glibc-common-2.17-292.el7.i686.rpm: glibc-common-2.17-292.el7.i686
Package glibc-common.i686 not installed, cannot update it. Run yum install to install it instead.
Examining glibc-devel-2.17-292.el7.i686.rpm: glibc-devel-2.17-292.el7.i686
Package glibc-devel.i686 not installed, cannot update it. Run yum install to install it instead.
Examining glibc-headers-2.17-292.el7.i686.rpm: glibc-headers-2.17-292.el7.i686
Package glibc-headers.i686 not installed, cannot update it. Run yum install to install it instead.
Examining libgcc-4.8.5-44.el7.i686.rpm: libgcc-4.8.5-44.el7.i686
Marking libgcc-4.8.5-44.el7.i686.rpm as an update to libgcc-4.8.5-36.el7.x86_64
Examining libselinux-2.5-15.el7.i686.rpm: libselinux-2.5-15.el7.i686
Marking libselinux-2.5-15.el7.i686.rpm as an update to libselinux-2.5-14.1.el7.x86_64
Examining libsepol-2.5-10.el7.i686.rpm: libsepol-2.5-10.el7.i686
Package libsepol.i686 not installed, cannot update it. Run yum install to install it instead.
Examining libstdc++-4.8.5-44.el7.i686.rpm: libstdc++-4.8.5-44.el7.i686
Marking libstdc++-4.8.5-44.el7.i686.rpm as an update to libstdc++-4.8.5-36.el7.x86_64
Examining nspr-4.25.0-2.el7_9.i686.rpm: nspr-4.25.0-2.el7_9.i686
Marking nspr-4.25.0-2.el7_9.i686.rpm as an update to nspr-4.19.0-1.el7_5.x86_64
Examining nss-softokn-freebl-3.44.0-8.el7_7.i686.rpm: nss-softokn-freebl-3.44.0-8.el7_7.i686
Marking nss-softokn-freebl-3.44.0-8.el7_7.i686.rpm as an update to nss-softokn-freebl-3.36.0-5.el7_5.x86_64
Examining nss-util-3.53.1-1.el7_9.i686.rpm: nss-util-3.53.1-1.el7_9.i686
Marking nss-util-3.53.1-1.el7_9.i686.rpm as an update to nss-util-3.36.0-1.el7_5.x86_64
Examining pcre-8.32-17.el7.i686.rpm: pcre-8.32-17.el7.i686
Package pcre.i686 not installed, cannot update it. Run yum install to install it instead.
Resolving Dependencies
--> Running transaction check
---> Package libgcc.x86_64 0:4.8.5-36.el7 will be updated
--> Processing Dependency: libgcc(x86-64) for package: redhat-lsb-core-4.1-27.el7.centos.1.x86_64
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
You can upgrade all the packages at the same time, using a command like this one:
sudo rpm -U glibc-2.17-317.el7.x86_64.rpm glibc-common-2.17-317.el7.x86_64.rpm
Or you can use yum update, like this:
sudo yum update --disablerepo="*" *.rpm
This has the advantage that packages not installed are not automatically installed by the upgrade (unless dependencies require it). --disablerepo="*" ensures that yum update does not try to download anything.
jlehtone in forums.centos.org solved my situation. I just needed to write
sudo rpm -i glibc-2.17-292.el7.i686.rpm nss-softokn-freebl-3.44.0-8.el7_7.i686.rpm nspr-4.25.0-2.el7_9.i686.rpm nss-util-3.53.1-1.el7_9.i686.rpm
Link to forums.centos.org
I was trying to install tensorflow from source on ubuntu 14.04, python 2.7.
I followed the steps from "tensorflow.org" for source installation.
I had completed all the steps, such as bazel installation, python dependencies installation.
In the final step for sudo pip installation; the command was as follows:-
$sudo pip install /tmp/tensorflow_pkg/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
but i am getting error as follows:
Unpacking /tmp/tensorflow_pkg/tensorflow-1.3.0rc0-cp27-none-linux_x86_64.whl
Downloading/unpacking tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Cleaning up...
No distributions at all found for tensorflow-tensorboard (from tensorflow==1.3.0rc0)
Storing debug log for failure in /home/ubuntu/.pip/pip.log
i also checked tensorflow_pkg wheel :but the above package was not available there.
so can a different .whl can be insatlled using pip such as -tensorflow-1.2.1-cp27-none-linux_x86_64.whl
which have downloaded in my desktop.
Please tell me how i can resolve this issue.
Thanks and regards
I didn't figure out the root of the problem, but for what its worth I skipped the tensorboard issue by installing an older version (1.2.0 worked for me)
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.0-cp27-none-linux_x86_64.whl
Try:
pip install tensorflow
If that doesn't work:
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.1-cp27-none-linux_x86_64.whl
More info here and Common problems here.
My issue was resolved by following steps.
I updated the pip using
Also exported proxy settings.
e.g export https_proxy=...
This was able to resolve my issue.
I also tried installing other .whl file for tensorflow and yes tensorflow can be installed using the downloaded .whl file also.
Thank you
I'm trying to install Django 1.4.3, but when I execute pip install, pip keeps installing Django 1.5 version instead 1.4.3
sudo pip install -I Django==1.4.3
It returns:
Downloading/unpacking Django==1.4.3
Running setup.py egg_info for package Django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
=== >>>> Requested Django==1.4.3, but installing version 1.5 <<<< ====
Installing collected packages: Django
Found existing installation: Django 1.5
Uninstalling Django:
Successfully uninstalled Django
Running setup.py install for Django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /usr/local/bin/django-admin.py to 755
Successfully installed Django
Cleaning up...
but if I execute pip freeze, it keeps showing
Django==1.5
What am I doing wrong?
Thank you
This could/should/can be helped by clearing the build dir for Django in pip.
There is a bug for this, since version 1.1 see here for details
You can start checking for these folders here if you're on OS X or unix like systems:
~/.pip
/tmp/pip-build-root (or pip-build-$USER, if you aren't running pip as root).
This is if you haven't specified a new build folder when you installed the first version of Django.
Good luck!
As limelight says, you should empty your cache and build directories, or pass in a temporary clean location with the --download-cache and flag.
$ pip help install
[...]
--download-cache <dir> Cache downloaded packages in <dir>.
-b, --build <dir> Directory to unpack packages into and build in. The default in a virtualenv is "<venv path>/build". The default for global installs is
"<OS temp dir>/pip-build-<username>".
I'd like to warn any readers to not use sudo pip install to install Django. It installs Django system-wide. And changing the system-wide version could break system-packages that depend on it. For instance, Ubuntu MAAS and Cobbler depend on the system django package. These are typically services you don't want to break.
If you need a different version than the system-package, use virtualenv to isolate your dependencies from the system.
OP seems to be on OSX and I don't know of any server-wide Mac Django, but that may change. Consider installing python packages with sudo at par to changing the system-installed python with python 3; it might work for now, but have some paracetamol in stock, as you're in for some headaches.
Check your local cache and remove it can be help. I hava installed pymongo==2.5.2. To install pymongo==2.4.1, I remove the cache in /tmp/pip-build-root/pymongo.Then I install pymongo 2.4.1 successfully.