CX_Oracle for python, under Anaconda is not installing - python

Anaconda keeps telling me that cx_oracle needs python 3.4.
My conda version is 4.3.17
This is after I used the cx_Oracle-5.3-11g.win-amd64-py3.5-2.exe installer. which is supposed to be used for Python 3.5.
conda install -c anaconda cx_oracle=5.2
Fetching package metadata ...............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- cx_oracle 5.2* -> python 3.4*
- python 3.5*
Use "conda info <package>" to see the dependencies for each package.
I'm doing something stupid, but I'm not sure what. yet.
ideas?
hints?

The error's telling you that the cx_oracle package you're trying to install depends on Python 3.4 b/c that's the currently available build of cx_oracle on the anaconda channel.
If you search for cx_oracle on anaconda.org, you'll see a list of available builds on several other channels, and can look for one that meets your reqs (namely v5.2, Python 3.5, win64). Doesn't look like there's one that meets that exact set of reqs, but there are a few v5.21 & v5.3 builds available. If that's close enough, then installing from say, the amodig channel may get you going: conda install -c amodig cx_oracle=5.2.1

Related

No module found error for a downloaded package (sksparse.cholmod) and how to download a package from the internet to conda

I need to use the sksparse.chomod package however my pycharm does not let me install it as it can't seem to find it.
I found the sksparse package on github and downloaded it but I do not know how to add a package downloaded from the internet into a conda environment. So, my first question would be can you download a package from github and add it to your conda environment, and how do you do this?
As I did not know how to do the above I instead saved the package within my project and thought I could simply import sksparse.cholmod. However, the line in my code that says import sksparse.cholmod as sks has no errors with it, so I assumed that meant this was ok, but when I try to run my file I get this error:
import sksparse.cholmod as sks
ModuleNotFoundError: No module named 'sksparse.cholmod'
If I have downloaded the package into my project why can't it be found, yet there are no errors when importing?
The cholmod file is a pyx file which I've been told should not be a problem.
Please could anyone help, I am reasonably new to python and I am looking for a straight forward solution that won't be time consuming.
It was an issue with windows, I was able to fix this using the instructions on this link
https://github.com/EmJay276/scikit-sparse
We must follow these steps precisely:
(This was tested with a Anaconda 3 installation and Python 3.7)
Install these requirements in order:
'''
conda install -c conda-forge numpy - tested with v1.19.1
conda install -c anaconda scipy - tested with v1.5.0
conda install -c conda-forge cython - tested with v0.29.21
conda install -c conda-forge suitesparse - tested with v5.4.0
'''
Download Microsoft Build Tools for C++ from https://visualstudio.microsoft.com/de/visual-cpp-build-tools/ (tested with 2019, should work with 2015 or newer)
Install Visual Studio Build Tools
Choose Workloads
Check "C++ Buildtools"
Keep standard settings
Run ''' pip install git+https://github.com/EmJay276/scikit-sparse '''
Test ''' from sksparse.cholmod import cholesky '''
Use all the versions stated for numpy etc, however with scipy I installed the latest version and it worked fine.

Error while running azuremlsdk::install_azureml() in R

I'm trying to load an existing azure workspace in RStudio Azure Compute Instance like it's shown in this link: https://azure.github.io/azureml-sdk-for-r/. But, after installing azuremlsdk package when I'm running this code azuremlsdk::install_azureml(). I'm getting this error :
Attempting uninstall: certifi  Found existing installation: certifi2016.9.26ERROR: Cannot uninstall 'certifi'. It is a distutilsinstalled project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.Error: Error installing package(s): 'azureml-sdk==1.10.0', 'numpy', 'pandas'
By referring to this link : https://learn.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-environments; I tried to fix this error by running conda remove certifi through terminal of that Compute Instance & Jupyter Notebook of that Compute Instance. But, no luck.
Does anyone have any experience in resolving this issue. Please help.
Azure ML has issues with Python versions and its dependency packages, make sure you are using Python package of 3.5 to 3.8 while installing these.
While installing azureml it will search for all the dependency packages and will install all of them, in this process there will be the version issues, like pandas, numpy.. with different pip versions.
From your stack trace looks like the error is happening when we install the packages like pandas numpy etc along with azureml-train-automl-client package so try to install them before hand by checking its versions which are dependent with you python versions packages.
Check the Azure ML documentation for installation of Azure ML Additional packages.
If you investigate them azureml-train-automl requires somes data science packages including pandas, numpy, and scikit-learn.
Kindly follow below commands for conda environment:
pip install azureml-train-automl
pip install --upgrade azureml-train-automl
pip install show azureml-train-automl
It seems that the Python SDK installation conflicts with itself when using Python 3.6 (the default). I was able to install the SDK for Python 3.7:
azuremlsdk::install_azureml(conda_python_version = '3.7')

Anaconda, and Pycharm set up. Error on Manjaro KDE

So I have been encountering some problems with setting up a proper Anaconda Interpreter with Pycharm. Per the documentation on the anaconda website, and the Pycharm website they are suggesting that I go to the Add Interpreter settings near the bottom right of the Pycharm GUI, once I click on the current interpreter.
For example,Pycharm is saying my current interpreter is Python 3.9 . Then click on the Conda Environment which I did, however, when I have done so I am getting an Error Message like:
CondaError: Unable to create prefix directory '/opt/anaconda/envs/pythonProject9'.
Here is the command output as well:
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /opt/anaconda/envs/pythonProject9
added / updated specs:
- python=3.9
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
ca-certificates pkgs/main/linux-64::ca-certificates-2021.4.13-h06a4308_1
certifi pkgs/main/linux-64::certifi-2020.12.5-py39h06a4308_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
ncurses pkgs/main/linux-64::ncurses-6.2-he6710b0_1
openssl pkgs/main/linux-64::openssl-1.1.1k-h27cfd23_0
pip pkgs/main/linux-64::pip-21.0.1-py39h06a4308_0
python pkgs/main/linux-64::python-3.9.4-hdb3f193_0
readline pkgs/main/linux-64::readline-8.1-h27cfd23_0
setuptools pkgs/main/linux-64::setuptools-52.0.0-py39h06a4308_0
sqlite pkgs/main/linux-64::sqlite-3.35.4-hdfb4753_0
tk pkgs/main/linux-64::tk-8.6.10-hbc83047_0
tzdata pkgs/main/noarch::tzdata-2020f-h52ac0ba_0
wheel pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
Preparing transaction: ...working... failed
==> WARNING: A newer version of conda exists. <==
current version: 4.9.2
latest version: 4.10.1
Please update conda by running
$ conda update -n base -c defaults conda
Is there something that I am doing wrong? Does anyone need pictures for the PATH? I am not certain if my problem is similar to another individual on here who asked a similar question. My Pycharm IDE is update for what its worth.
The error (which you should have copy-pasted, not screenshotted) says
Unable to create prefix directory /opt/anaconda/envs/pythonProject9
Check you have sufficient permissions.
My best guess is that you've installed Anaconda as root (e.g. using sudo) and are using PyCharm as a regular user (as you should).
If possible, tell PyCharm (or Anaconda) to use a different base path for the environment it's attempting to create, e.g. one under your home directory, or if you're feeling daring, you might chmod /opt/anaconda/envs so you, too, can write there.

Can't find Brew installed packages on Mac M1 in Pycharm

I'm having trouble installing packages and using them in Pycharm. I've followed various threads (I'm new to Macs and seem to have tried everything) now I'm stuck.
In this case, I want to use the package xgboost.
I have brew installed, after launching a terminal using Rosetta:
%brew install xgboost
Warning: xgboost 1.3.3 is already installed and up-to-date.
It appears installed OK here:
/opt/homebrew/Cellar/xgboost
I also have Python installed here:
/opt/homebrew/Cellar/python#3.9
But no matter how I configure an Interpreter in Pycharm, I can't seem to get the package recognised.
Where have I gone wrong?
I am very unsure exactly how, but I've got this working.
Following: https://abbasegbeyemi.me/blog/homebrew-python-apple-m1
I changed the order of elements in my path:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin
then a new interpreter in Pycharm using:
usr/local/Cellar/Python#3.9/3.9.2_2/bin/python3.9
Now I can install packages just using pip in pycharm and it works.
This has been 6 hours of pain - warning to anyone who isn't well versed in macs, setting up an M1 for python dev was a complete nightmare for me.
Docs: https://xgboost.readthedocs.io/en/latest/build.html
Pre-built binary wheel for Python
If you are planning to use Python, consider installing XGBoost from a pre-built binary wheel, available from Python Package Index (PyPI). You may download and install it by running
# Ensure that you are downloading one of the following:
# * xgboost-{version}-py2.py3-none-manylinux1_x86_64.whl
# * xgboost-{version}-py2.py3-none-win_amd64.whl
pip3 install xgboost

conda skeleton cran uses wrong version of R

I am trying to package some R packages from CRAN to use in a conda environment because I am using a combination of Python and R packages for a bioinformatics pipeline. Because of other dependencies, I need to keep R at version 3.3
I made a brandnew environment with the version of Python and R I want:
$ conda create -n bioinfo python=3.6.3 r=3.3.2
There is no R installed in the root environment. Then I follow the instructions for conda skeleton:
(bioinfo)$ conda skeleton cran rootSolve
(bioinfo)$ conda skeleton cran rootSolve
(bioinfo)$ conda build r-rootsolve
For some reason, this keeps coming up with an R3.4 dependency, even though according to CRAN, the rootSolve package only needs R>=2.01! Where is this coming from??
The following NEW packages will be INSTALLED:
r-base: 3.4.2-haf99962_0
Though building the package does not actually change the version of R running in my environment, the package does not load. Any ideas, please?
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
> library('rootSolve')
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/people/bioc1402/miniconda3/envs/bioinfo2/lib/R/library/rootSolve/libs/rootSolve.so':
/usr/people/bioc1402/miniconda3/envs/bioinfo2/lib/R/library/rootSolve/libs/rootSolve.so: undefined symbol: R_ExternalPtrAddrFn
In addition: Warning message:
package ‘rootSolve’ was built under R version 3.4.2
Error: package or namespace load failed for ‘rootSolve’
Apparently this was a bug, now fixed in conda-build 3.1.3,
https://github.com/conda/conda-build/issues/2562
Thanks conda team!
'conda build r-rootsolve --R=3.3.1' now works appropriately with the recipe generated by conda skeleton.

Categories