when i try to install the package xmlsec in normal environment , it works fine and the the installation ends successfully by when i try to install the same package with the same pip3 version , it hangs:
[root#5d01783a0d80 /]# pip3 install 'xmlsec==1.3.3'
Collecting xmlsec==1.3.3
Downloading http://prrepo.fr.net.intra/nexus/repository/pypi-software-fundation/packages/xmlsec/1.3.3/xmlsec-1.3.3.tar.gz
Requirement already satisfied: pkgconfig in /usr/local/lib/python3.6/site-packages (from xmlsec==1.3.3)
Requirement already satisfied: lxml>=3.0 in /usr/local/lib64/python3.6/site-packages (from xmlsec==1.3.3)
Installing collected packages: xmlsec
Running setup.py install for xmlsec ... done
Successfully installed xmlsec-1.3.3
and in the virtual env
[root#5d01783a0d80 /]# cd /venv/awx/bin/
[root#5d01783a0d80 bin]# source activate
(awx) [root#5d01783a0d80 bin]# pip3 install 'xmlsec==1.3.3'
Looking in indexes: http://prrepo.fr.net.intra/nexus/repository/pypi-software-fundation/simple
Collecting xmlsec==1.3.3
Downloading http://prrepo.fr.net.intra/nexus/repository/pypi-software-fundation/packages /xmlsec/1.3.3/xmlsec-1.3.3.tar.gz (29 kB)
it hangs for 10 min before and it end up with error looking in external repo not reachable for a dependency (lxml) that already exist locally.
Any idea please ?
Related
I am on Ubuntu 21.10 and created a small python package which also consists of a setup.py and setup.cfg file. In my setup.cfg there are these lines:
[install]
install_scripts = /etc/icinga2/scripts
Now when I am in that directory and try to install virtualenv or any other package I get this:
nicolas#tp-t14:~/git/test$ pip3 install virtualenv
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Defaulting to user installation because normal site-packages is not writeable
Collecting virtualenv
Using cached virtualenv-20.14.1-py2.py3-none-any.whl (8.8 MB)
Requirement already satisfied: six<2,>=1.9.0 in /usr/lib/python3/dist-packages (from virtualenv) (1.16.0)
Requirement already satisfied: filelock<4,>=3.2 in /home/nicolas/.local/lib/python3.9/site-packages (from virtualenv) (3.7.0)
Requirement already satisfied: platformdirs<3,>=2 in /usr/local/lib/python3.9/dist-packages (from virtualenv) (2.5.1)
Requirement already satisfied: distlib<1,>=0.3.1 in /home/nicolas/.local/lib/python3.9/site-packages (from virtualenv) (0.3.4)
Installing collected packages: virtualenv
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
ERROR: Could not install packages due to an OSError: [Errno 13] Keine Berechtigung: '/etc/icinga2'
Check the permissions.
Why does pip3 reads from setup.cfg when I only want to install a package. It also happens with other packages I want to install. If I remove these lines from the setup.cfg file the installation works flawlessly and looks like this:
nicolas#tp-t14:~/git/test$ pip3 install virtualenv
Defaulting to user installation because normal site-packages is not writeable
Collecting virtualenv
Using cached virtualenv-20.14.1-py2.py3-none-any.whl (8.8 MB)
Requirement already satisfied: platformdirs<3,>=2 in /usr/local/lib/python3.9/dist-packages (from virtualenv) (2.5.1)
Requirement already satisfied: filelock<4,>=3.2 in /home/nicolas/.local/lib/python3.9/site-packages (from virtualenv) (3.7.0)
Requirement already satisfied: six<2,>=1.9.0 in /usr/lib/python3/dist-packages (from virtualenv) (1.16.0)
Requirement already satisfied: distlib<1,>=0.3.1 in /home/nicolas/.local/lib/python3.9/site-packages (from virtualenv) (0.3.4)
Installing collected packages: virtualenv
Successfully installed virtualenv-20.14.1
There are even no DEPRECATION warnings anymore.
I only want to understand the background of that because I now struggled quite a lot of time with my deployment scripts here because of that.
pip install indicates that the nitime package was successfully installed but it is not. Why is this?
$ pip3 install nitime
Defaulting to user installation because normal site-packages is not writeable
Collecting nitime
Using cached nitime-0.9.tar.gz (6.2 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in ./.local/lib/python3.8/site-packages (from nitime) (1.22.3)
Requirement already satisfied: cython in /usr/lib64/python3.8/site-packages (from nitime) (0.29.14)
Requirement already satisfied: scipy in ./.local/lib/python3.8/site-packages (from nitime) (1.8.0)
Requirement already satisfied: matplotlib in /usr/lib64/python3.8/site-packages (from nitime) (3.2.2)
Requirement already satisfied: networkx in /usr/lib/python3.8/site-packages (from nitime) (2.5)
Requirement already satisfied: nibabel in ./.local/lib/python3.8/site-packages (from nitime) (3.2.2)
Requirement already satisfied: cycler>=0.10 in /usr/lib/python3.8/site-packages (from matplotlib->nitime) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/lib64/python3.8/site-packages (from matplotlib->nitime) (1.3.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/lib/python3.8/site-packages (from matplotlib->nitime) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in ./.local/lib/python3.8/site-packages (from matplotlib->nitime) (2.8.2)
Requirement already satisfied: decorator>=4.3.0 in /usr/lib/python3.8/site-packages (from networkx->nitime) (4.4.0)
Requirement already satisfied: packaging>=14.3 in ./.local/lib/python3.8/site-packages (from nibabel->nitime) (21.3)
Requirement already satisfied: setuptools in ./.local/lib/python3.8/site-packages (from nibabel->nitime) (60.6.0)
Requirement already satisfied: six in /usr/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->nitime) (1.14.0)
Using legacy 'setup.py install' for nitime, since package 'wheel' is not installed.
Installing collected packages: nitime
Running setup.py install for nitime ... done
Successfully installed nitime
$ pip3 show nitime
WARNING: Package(s) not found: nitime
$ python3 -c "import nitime"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'nitime'
$ pip3 show pip
Name: pip
Version: 22.0.4
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig#python.org
License: MIT
Location: /home/servoz/.local/lib/python3.8/site-packages
Requires:
Required-by:
$ uname -a
Linux 5.11.22-100.fc32.x86_64 #1 SMP Wed May 19 18:58:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ python3 -V
Python 3.8.10
EDIT:
Ok! I managed to install using dnf install python3-nitime (fedora).
I don't really understand why pip doesn't work with nitime on fedora ...
This may be because of conflicts with other packages, so try doing this in a new environment. Try creating a virtual environment. Install virtualenv using this:
pip install virtualenv
Create a virtual environment named venv using this:
virtualenv venv
To activate the virtual environment, use this:
source ./venv/bin/activate
Try installing nitime now:
pip3 install nitime
Done!
You can deactivate the virtual environment using this:
deactivate
When I install pycurl
>$ /opt/python/run/venv/bin/pip install pycurl --global-option="--with-openssl" --upgrade
/opt/python/run/venv/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py:230: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options)
Collecting pycurl
Using cached pycurl-7.43.0.6.tar.gz (222 kB)
Skipping wheel build for pycurl, due to binaries being disabled for it.
Installing collected packages: pycurl
Running setup.py install for pycurl ... done
Successfully installed pycurl-7.43.0.6
Then checks installation, it does not appear
>$ /opt/python/run/venv/bin/pip show pycurl
WARNING: Package(s) not found: pycurl
And of course any code wanting to use the lib does not find it (celery, for instance)
What I am doing wrong?
I found the answer to another question (sorry, I can't find the link).
This worked for me:
export CPPFLAGS=-I/usr/local/opt/openssl/include
export LDFLAGS=-L/usr/local/opt/openssl/lib
pip install pycurl==7.43.0.5 --global-option="--with-openssl" --upgrade
I want to install conda command not anaconda but I have this erreur all time :
C:\Windows\system32>pip install conda
Collecting conda
Using cached conda-4.3.13.tar.gz
Collecting pycosat>=0.6.1 (from conda)
Using cached pycosat-0.6.1.tar.gz
Collecting requests>=2.12.4 (from conda)
Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting ruamel.yaml>=0.11.14 (from conda)
Using cached ruamel.yaml-0.14.5.tar.gz
Collecting menuinst (from conda)
Could not find a version that satisfies the requirement menuinst (from conda)
(from versions: )
No matching distribution found for menuinst (from conda)
C:\Windows\system32>
You can install conda 4.2.7 using pip and then update it to the latest version.
auxlib is required in python 3.6.1. Install it using pip3 install auxlib
Now install conda 4.2.7 using pip3 install conda==4.2.7 and then update it using conda update conda.
I have installed flake8 successfully:
$ pip install flake8
Downloading/unpacking flake8
Downloading flake8-2.5.4-py2.py3-none-any.whl
Downloading/unpacking mccabe<0.5,>=0.2.1 (from flake8)
Downloading mccabe-0.4.0-py2.py3-none-any.whl
Downloading/unpacking pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7 (from flake8)
Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB): 41kB downloaded
Downloading/unpacking pyflakes<1.1,>=0.8.1 (from flake8)
Downloading pyflakes-1.0.0-py2.py3-none-any.whl (152kB): 152kB downloaded
Installing collected packages: flake8, mccabe, pep8, pyflakes
Successfully installed flake8 mccabe pep8 pyflakes
Cleaning up...
$ pip list|grep flake
flake8 (2.5.4)
pyflakes (1.0.0)
But it doesn't appear in any of the directories under /usr (/usr/bin/, /usr/sbin/, /usr/local/...) i.e. "which flake8" doesn't show anything, so I can't use from the console manually to verify a script like in the instructions.
You should look in ~/.local/ the pip you have installed (from Ubuntu's repositories) is modified to prevent the user from installing packages globally. You'll need to look for something like ~/.local/bin/flake8 and then you'll want to update your shell config to do something like
export PATH="~/.local/bin:$PATH"
So that it finds the executables you install with pip.