Unable to install yfinance - libxml2

The package will not install.
In the command prompt I entered, 'pip install yfinance'
C:\Users\gam19\AppData\Local\Temp\xmlXPathInitw4g8q0z6.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x86\\cl.exe' failed with exit code 2
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

You can download the wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml and install it (E.g. pip install lxml‑4.9.0‑cp311‑cp311‑win_amd64.whl). Trying pip install yfinance might work after that.

Related

fatal error: cannot execute 'cc1': execvp: Permission denied

I created a conda environment on a HPC node and want to install a R package called "ape" but got a fatal error message.
when I run install.packages"ape"
I got the error message
x86_64-conda-linux-gnu-cc: fatal error: cannot execute 'cc1': execvp: Permission denied.
I installed the gcc by conda install -c conda-forge gxx_linux-64 but it still doesn't work.
I don't have permission to use apt-get install gcc since I am not an admin of the HPC. What can I do to fix this? Any recommendations will be appreciated.
Thank you.
I recommend not using install.packages, instead install the Conda Forge package r-ape (see https://stackoverflow.com/a/60767530/570918). Also, you get the amazing bonus that everything is precompiled (super fast install, especially if using mamba).

During Instl apache-airflow got the error: subprocess-exited-with-error, Building wheel for setproctitle (pyproject.toml) did not run successfully

pip install apache-airflow
pip3.9 install apache-airflow
The Err by Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Using legacy 'setup.py install' for flask-login, since package 'wheel' is not installed.
Using legacy 'setup.py install' for python-nvd3, since package 'wheel' is not installed.
Using legacy 'setup.py install' for python-slugify, since package 'wheel' is not installed.
Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
Using legacy 'setup.py install' for unicodecsv, since package 'wheel' is not installed.
Using legacy 'setup.py install' for blinker, since package 'wheel' is not installed.
Using legacy 'setup.py install' for Flask-JWT-Extended, since package 'wheel' is not installed.
Building wheels for collected packages: setproctitle
Building wheel for setproctitle (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for setproctitle (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
running bdist_wheel
running build
running build_ext
building 'setproctitle' extension
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for setproctitle
Failed to build setproctitle
ERROR: Could not build wheels for setproctitle, which is required to install pyproject.toml-based projects
actually already tried to downgrade the pip version from pip 22.0.3 to 20.2.4
pip install --upgrade pip==20.2.4
like solution in the thread "Could not build wheels for setproctitle..."
still the same error

HOW to fix pip3 intall pygdal==2.2.3.3 or pip3 install pygdal sent this error

error
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USER\AppData\Local\Temp\pip-install-w_pz3 u2e\pygdal\
i try to install pygdal package i have always the same error
Command "python setup.py egg_info" failed with error code 1 in C:\Users\bough\AppData\Local\Temp\pip-install-w_pz3
u2e\pygdal\
python 3.6 python 3.7 the same error always
EDIT: Complete Error Text
e4cb71f72e29da0c25a1ea9135596a577/pygdal-2.2.3.3.tar.gz Complete
output from command python setup.py egg_info: running egg_info
creating pip-egg-info\pygdal.egg-info writing
pip-egg-info\pygdal.egg-info\PKG-INFO writing dependency_links to
pip-egg-info\pygdal.egg-info\dependency_links.txt writing requirements
to pip-egg-info\pygdal.egg-info\requires.txt writing top-level names
to pip-egg-info\pygdal.egg-info\top_level.txt writing manifest file
'pip-egg-info\pygdal.egg-info\SOURCES.txt' error: [WinError 2] The
system cannot find the file specified

Installing RApache in Ubuntu 16.04 Apache/2.4.18 (Ubuntu): I get some errors

I am trying to install RApache in Ubuntu 16.04 Apache/2.4.18 (Ubuntu) but I get some errors:
1- First when i install some packages:
sudo apt-get install apache2-prefork-dev apache2-mpm-prefork libapreq2-dev r-base-dev
I get an error message:
Package apache2-mpm-prefork is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package apache2-prefork-dev
E: Package 'apache2-mpm-prefork' has no installation candidate
When I try
debuild -us -uc
I get the message:
This package has a Debian revision number but there does not seem to be
an appropriate original tar file or .orig directory in the parent directory;
(expected one of libapache2-mod-r-base_1.2.8.orig.tar.gz, libapache2-mod-r-base_1.2.8.orig.tar.bz2,
libapache2-mod-r-base_1.2.8.orig.tar.lzma, libapache2-mod-r-base_1.2.8.orig.tar.xz or rapache.orig)
continue anyway? (y/n)
I decide for yes but it does not work, I get:
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package libapache2-mod-r-base
dpkg-buildpackage: source version 1.2.8-xenial0
dpkg-buildpackage: source distribution xenial0
dpkg-buildpackage: source changed by Jeroen Ooms
dpkg-source --before-build rapache
dpkg-buildpackage: host architecture amd64
dpkg-checkbuilddeps: error: Unmet build dependencies: apache2-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc failed
Is there anybody who can help me please?
I really appreciate any help you can provide.
Roberto
You are missing a whole bunch of files. See the official documentation for preparing the proper directory structure, suitable for packaging. See this package source as an example.

Unable to install rJava on R platform

I have Ubuntu 10.x OS and I have installed R on it. I want to install rJava on R. For that when I am running installed.packages("rJava) command which is giving error
checking whether Java run-time works... Error: Could not find or load main class getsp
no
configure: error: Java interpreter '/usr/bin/java' does not work
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/hduser/R/i486-pc-linux-gnu-library/2.10/rJava’
The downloaded packages are in
‘/tmp/Rtmp0tlBXn/downloaded_packages’
Warning message:
In install.packages("rJava") :
installation of package 'rJava' had non-zero exit status
If I run system("java -version")
Then it showing same Java version which is given when I run Java -version command from base OS prompt. So it means no problem with Java which I can see reason in output of install package command? As suggested when I use
sudo apt-get install r-cran-rjava
Here also didnt get any luck
Please suggest
I just saw that you wrote installed.packages instead of install.packages, you have to use install.packages("rJava") to install it.
The description of the method you used (installed.packages) says: Find (or retrieve) details of all packages installed in the specified libraries.
Can you please try
install.packages("rJava")
library(rJava)
and tell me the output? (I'm pretty sure it will already work then).
in the terminal run sudo apt-get install default-jdk
then run sudo R CMD javareconf
after that you can continue in R or Rstudio install.packages("rJava")

Resources