I am new to python and am trying to use the libxml2 package.
This is what I get:
Executed command:
pip install libxml2-python
Error occurred:
Non-zero exit code (1)
Command output:
Collecting libxml2-python
Could not find a version that satisfies the requirement libxml2-python (from versions: )
No matching distribution found for libxml2-python
I am using Kali Linux amd_64, although I have tried on Windows 7 64 and get the same error. I've tried 32 and 64 bit versions of Python 2.7, 3.5.3, 3.6. I am using PyCharm. I have added it to the requirements.txt, tried to add it from there, as well as in both venv and non-venv with different python versions.
I've tried installing it locally, I've tried pip install and easy install, as well as pip install ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz
I also installed Anaconda, thinking that would sort it, as it comes with libxml2 pre-installed. When I try to import it in anaconda, I get:
Executed command:
Conda /root/anaconda3/bin/conda install -p /root/anaconda3 libxml2-python==2.6.21 -y
Error occurred:
PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels:
Command output:
PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels:
- libxml2-python ==2.6.21
You can search for packages on anaconda.org with
anaconda search -t conda libxml2-python
You may need to install the anaconda-client command line client with
conda install anaconda-client
The anaconda client is installed.
Also:
conda install -p /root/anaconda3 libxml2 -yFetching package metadata .........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /root/anaconda3:
#
libxml2 2.9.4 0
Any suggestions are welcome, please help!
Related
create virtual environment conda create test python=3.7
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /Users/mac/miniconda3/envs/test
added / updated specs:
- python=3.7
The following NEW packages will be INSTALLED:
ca-certificates pkgs/main/osx-64::ca-certificates-2019.10.16-0
certifi pkgs/main/osx-64::certifi-2019.9.11-py37_0
libcxx pkgs/main/osx-64::libcxx-4.0.1-hcfea43d_1
libcxxabi pkgs/main/osx-64::libcxxabi-4.0.1-hcfea43d_1
libedit pkgs/main/osx-64::libedit-3.1.20181209-hb402a30_0
libffi pkgs/main/osx-64::libffi-3.2.1-h475c297_4
ncurses pkgs/main/osx-64::ncurses-6.1-h0a44026_1
openssl pkgs/main/osx-64::openssl-1.1.1d-h1de35cc_3
pip pkgs/main/osx-64::pip-19.3.1-py37_0
python pkgs/main/osx-64::python-3.7.5-h359304d_0
readline pkgs/main/osx-64::readline-7.0-h1de35cc_5
setuptools pkgs/main/osx-64::setuptools-42.0.1-py37_0
sqlite pkgs/main/osx-64::sqlite-3.30.1-ha441bb4_0
tk pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
wheel pkgs/main/osx-64::wheel-0.33.6-py37_0
xz pkgs/main/osx-64::xz-5.2.4-h1de35cc_4
zlib pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3
check the reference of pip, which is correct.
(test) mac#mac-MBP ~ % which pip
/Users/mac/miniconda3/envs/test/bin/pip
(test) mac#mac-MBP ~ % pip --version
pip 19.3.1 from /Users/mac/miniconda3/envs/test/lib/python3.7/site-packages/pip (python 3.7)
install pip install jupyter
shows
Requirement already satisfied: jupyter in ./.local/lib/python3.7/site-packages (1.0.0)
I can use conda to uninstall and reinstall pip, which will solve the Requirement already satisfied issue, but it also upgrades python3.7 to 3.8 for some reason. I have to use 3.7 because tensorflow currently only supports 3.7.
Not sure what's wrong here. I have used the same commands to create environment and also worked smoothly. The only change I can think of is that I changed from bash to zsh because of Catalina. Any help would be appreciated.
The issue was I installed Jupyter with --user flag before, so the package was installed in the user directory outside of the conda env directory. pip list --user shows these packages.
The solution is to uninstall these packages first.
pip freeze --user > packages.txt
pip uninstall -r packages.txt
You can call the pip with the python version you want to install the package for. For more detail please go through the link am pasting below:
Install a module using pip for specific python version
and do not forget to restart your anaconda after installing.
Hope it'll solve your issue
While installing Turicreate using pip on my macOS it gave me an error,
Could not find a version that satisfies the requirement turicreate (from versions: )
No matching distribution found for turicreate
I did the following steps:
conda create -n venv python=2.7 anaconda
source activate venv
pip install -U turicreate
pip install --upgrade pip
Requirement already up-to-date: pip in ./anaconda/lib/python3.5/site-packages
Although you create your venv virtual environment with python=2.7, the message you get when trying to upgrade pip indicates that you are running it in Python 3.5; the path
./anaconda/lib/python3.5/site-packages
clearly refers to the base Anaconda installation, and not to your venv virtual environment.
Given that, the error message you get is not unexpected, since Turicreate is not yet available for Python 3.5:
System Requirements
Python 2.7 (Python 3.5+ support coming soon)
x86_64 architecture
Partially related to this question [now removed from SO] but now focus solely on installing packages in Anaconda that does not exist in Anaconda directory here. An example could be the COIN-OR CLP package here that has interfaces in R here and Python here. I want to make the COIN-OR CLP packages available to the Python/R clients in Anaconda.
What is the proper way of installing packages in Anaconda not existing in its directory?
Alternative 1. Installation of Coin-MP containing the COIN-OR CLP but
$ conda install coinmp
Fetching package metadata ...........
PackageNotFoundError: Package missing in current osx-64 channels:
- coinmp
Alternative 2. Installation from sources causes the error such that
svn co https://projects.coin-or.org/svn/CoinMP/stable/1.7 CoinMP
cd CoinMP
./configure -C
...
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
with both COIN-MP and COIN-OR CLP.
The channel conda-forge provides a compiled version. Install by specifying this channel:
conda install -c conda-forge coinmp
This question is for Python 3.5.2, using Anaconda 4.3.0 on Windows 10 (64-bit)
When I try to install packages with pip I get this error:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\HMGSYS\AppData\Local\Temp\pip-build-xit1wtvr\shapely\
Based on other SO answers, I tried to upgrade setuptools:
pip install --upgrade setuptools
But I get this error:
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\HMGSYS\\Anaconda3\\lib\\site-packages\\setuptools-27.2.0-py3.5.egg'
However, if I try to install setuptools:
python -m pip install -U pip setuptools
It tells me that all packages are up to date, including setuptools:
Requirement already up-to-date: setuptools in c:\users\hmgsys\anaconda3\lib\site-packages
Also, when I look in lib\site-packages, I see a folder for setuptools and another for setuptools-34.3.2.dist-info.
What should I try next? Why is setuptools looking for version 27.2.0 and ignoring the more recent versions?
EDIT:
I downloaded the specific version of setuptools that the system was looking for and the error from 'pip install --upgrade setuptools' disappeared. However, I'm still getting the first 'egg_info' error. I've also installed ez_setup, which had no effect.
Try to use conda to update setuptools:
conda update setuptools
You may try to downgrade your python into python 3.5.0.
conda install python=3.5.0
( I had encountered the same error with python 3.5.3, and it installed without error after downgraded to 3.5.0.)
I'm trying to install cx_freeze to a virtual environment I've made in anaconda. From within the environment, I type (https://binstar.org/pyzo/cx_freeze):
conda install -c https://conda.binstar.org/pyzo cx_freeze
I get the following message:
Fetching package metadata: ...
Solving package specifications: ..
Error: Unsatisfiable package specifications.
Generating hint:
[2/2 ] |#####################################################################################################################################################################################| 100%
Hint: the following combinations of packages create a conflict with the
remaining packages:
- python 2.7*
- cx_freeze
I'm using anaconda 3.7.4 on python version 2.7.9 on linux-64 Ubuntu 14.
In case conda install cannot install a package because there is a conflict with the version of Python you use:
make sure pip is installed in your current (virtual) Python environment: conda install pip (or conda list to see whether pip is in the list of installed packages)
install your package using pip: pip install <name of your package>