Could not find a version that satisfies conda for python 3 - python-3.x

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.

Related

What is the main problem in this situation?

(kivy_venv) C:\Users\Momin Khan Studio>python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.22 kivy_deps.glew==0.1.22
Collecting docutils
Using cached docutils-0.18.1-py2.py3-none-any.whl (570 kB)
Collecting pygments
Using cached Pygments-2.10.0-py3-none-any.whl (1.0 MB)
Collecting pypiwin32
Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2==0.1.22 (from versions: 0.4.2, 0.4.3)
ERROR: No matching distribution found for kivy_deps.sdl2==0.1.22
why you just don't easily by typing python -m pip install kivy[base] or install full kivy with python -m pip install kivy[full] even you can customize what you want by python -m pip install kivy[base,media] every of the examples automatically download what they need to work and you don't have to install dependencies manually

unable to locate pip packages using asdf in VSC

I have just installed a fresh install of BigSur and Python (using asdf) when installing pip packages they seem to end up in:
./.asdf/installs/python/3.9.2/lib/python3.9/site-packages
when typing which flake8 for example I get flake8 not found but when I go to install it again pip install flake8 I get the following:
> which flake8
flake8 not found
~
> pip install flake8
Requirement already satisfied: flake8 in ./.asdf/installs/python/3.9.2/lib/python3.9/site-packages (3.8.4)
Requirement already satisfied: pycodestyle<2.7.0,>=2.6.0a1 in ./.asdf/installs/python/3.9.2/lib/python3.9/site-packages (from flake8) (2.6.0)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in ./.asdf/installs/python/3.9.2/lib/python3.9/site-packages (from flake8) (0.6.1)
Requirement already satisfied: pyflakes<2.3.0,>=2.2.0 in ./.asdf/installs/python/3.9.2/lib/python3.9/site-packages (from flake8) (2.2.0)
I have just tried to use requests which I installed like pip install requests and I also got not found when using which but I manage to use the package in VSC ok.
I am using flake8 and Black and I need to give VSC their paths. I have used
./.asdf/installs/python/3.9.2/lib/python3.9/site-packages/<package name>
but VSC doesn't seem to pip it up. I am using the latest verisons.
> python -V
Python 3.9.2
~
> pip -V
pip 21.0.1 from /Users/paul/.asdf/installs/python/3.9.2/lib/python3.9/site-packages/pip (python 3.9)
this might help too:
~
> which python
/Users/paul/.asdf/shims/python
~
> which pip
/Users/paul/.asdf/shims/pip
Any idea how I can get which to display the correct paths so I can get my listing and formatting working ok?
This fixed it... https://til.hashrocket.com/posts/ques11vrjs-get-pip-installed-executables-into-the-asdf-path
asdf reshim python
I would be curious why I have to do this...if anyone could answer

xmlsec installation hangs in virtualenv environement

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 ?

pip3 installs a version of dependency that violates requirement specifiers

I have the following two dependencies in my requirements.txt:
$ pip3 install elasticsearch==7.0.0 requests==2.21.0
Collecting elasticsearch==7.0.0
Using cached https://files.pythonhosted.org/packages/a8/27/d3a9ecd9f8f972d99da98672d4766b9f62ef64c323c40bb5e2557e538ea3/elasticsearch-7.0.0-py2.py3-none-any.whl
Collecting requests==2.21.0
Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Collecting urllib3>=1.21.1 (from elasticsearch==7.0.0)
Using cached https://files.pythonhosted.org/packages/39/ec/d93dfc69617a028915df914339ef66936ea976ef24fa62940fd86ba0326e/urllib3-1.25.2-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests==2.21.0)
Using cached https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.21.0)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests==2.21.0)
Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
requests 2.21.0 has requirement urllib3<1.25,>=1.21.1, but you'll have urllib3 1.25.2 which is incompatible.
Installing collected packages: urllib3, elasticsearch, certifi, chardet, idna, requests
Successfully installed certifi-2019.3.9 chardet-3.0.4 elasticsearch-7.0.0 idna-2.8 requests-2.21.0 urllib3-1.25.2
I want to understand this warning that appeared in the above output:
requests 2.21.0 has requirement urllib3<1.25,>=1.21.1, but you'll have urllib3 1.25.2 which is incompatible.
Why did pip install urllib3 1.25.2? It does not seem to make sense. The required dependencies are:
elasticsearch==7.0.0 requires urllib3>=1.21.1 (source)
requests==2.21.0 requires urllib3>=1.21.1,<1.25 (source)
Both dependencies could have been easily satisfied by installing urllib3 1.24.3. Why did pip3 then install urllib3 1.25.2? Isn't deciding the correct version according to the available requirements one of its responsibility?
It this a bug in pip3 or is this functioning as designed?
Update on 10th of November 2020
Install beta version of pip, it will solve the dependencies correctly for you.
Or install latest stable and run pip install --use-feature=2020-resolver.
Original answer
As it is now, pip doesn’t have true dependency resolution, but instead simply uses the first specification it finds for a project.
You can add constraints.txt file with urllib3==1.24.3 and then invoke:
$ pip install -r requirements.txt -c contraints.txt
That would do the job. When updating requirements remember to update also contraints.
Alternatively you can use one of Python dependency managers:
Pipenv
Poetry
pip-tools
DepHell
See Requirements Files and Constraints Files sections in pip user guide and Managing Application Dependencies tutorial.

Installing Tensorflow 1.9 in Windows

I am trying to install tensorflow in Windows,
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl
The error I got is
Collecting protobuf>=3.4.0 (from tensorflow==1.9.0) Could not find a
version that satisfies the requirement protobuf>=3.4.0 (from
tensorflow==1.9.0) (from versions: ) No matching distribution found
for protobuf>=3.4.0 (from tensorflow==1.9.0)
I googled online and I couldn't find any solutions. I am using python 3.5 64 bit
If you are using Anaconda
Create a new environment or activate your existing environment
conda create -n Tensorflow_Environment python=3.6
activate Tensorflow_Environment
pip install --ignore-installed --upgrade tensorflow==1.9.0
You could refer Tensorflow Install for GPU version Installation
I installed python 3.5.4 and tried to install tensorflow but then pip started showing SSL certificate error. Googling online gave me a stackoverflow answer here.
The command that worked for me is
python -m pip install tensorflow --trusted-host files.pythonhosted.org --trusted-host pypi.org --trusted-host pypi.python.org

Resources