How to install previous version of spacy - spacy-3

I am trying to train a custom model in spacy but the new update has totally changed how it must be done. Is there any way to download a previous version of spacy on anaconda e.g. spacy 3.0.6

You can download old versions the same way you do with any package.
conda install spacy==3.0.6
Note that spaCy training did not change significantly between 3.0.6 and the latest 3.1.3. Perhaps you wanted to use v2?

Related

R Package Conflicts in Anaconda3

I have installed Anaconda 3 for Mac M1 and I am trying to create a new environment for R. However, everytime I try to do this, I am faced with the below error:
Conda Prompt Error Message
I am faced with this error irrespective of whether I try to do this in anaconda navigator or conda prompt. I have already tried removing Anaconda completely and reinstalling it again but to no avail. Is there anything I can do here?
Update: As requested, here is an additional screenshot:
Mamba install r-eesentials
Mamba install r-essentials output
[Disclosure: I am a volunteer on the Conda Forge R team.]
Conda users who want to use R should prioritize Conda Forge. The Anaconda company has not actively maintained R packages since v3.6.
If installing Conda for the first time, I recommend Miniforge variants (specifically, Mambaforge), rather than the Anaconda distributions (which prioritize defaults/anaconda channel).
Also note that osx-arm64 support for R through Conda is currently sparse. We are actively working on migrating, but for simplicity of workflow, I still recommend Conda users to install a osx-64 version of Conda and use that platform when installing R. You can always create native osx-arm64 environments when you actually need them (e.g., native TensorFlow with Metal support).

Update R 4.0.5 to R 4.1.1 with conda on ubuntu 18.04 [duplicate]

On Ubuntu in a Conda environment with Python 3.7.3, when I run
conda install -c conda-forge opencv
I get OpenCV 3.4.2 (checked with import cv2 and then cv2._version__) even though https://anaconda.org/conda-forge/opencv indicates version 4.11. Why?
Note that I didn't have OpenCV installed previously (I ran conda uninstall opencv and it got completely removed)
tl;dr You likely have previously installed dependencies that need updating. If you require a specific version, say 4.1, then express this to Conda:
conda install -c conda-forge opencv=4.1
Explanation
How Conda Interprets Specifications
A literal translation of the command
conda install -c conda-forge opencv
would go something like
With the conda-forge channel included, ensure that some version of the package opencv is installed in the currently active environment.
The logic here implies that any version it can install would be a valid solution. It also doesn't tell it that it must come from Conda Forge, only that that channel should be included.1
Two-Stage Solve Strategy
Starting with v4.7, Conda uses a two-stage dependency solving strategy. The two stages are
Solve with an implicit --freeze-installed|--no-update-deps flag. This attempts to find the newest version of the requested package that has no conflicts with installed packages. That is, it considers any installation of the package, no matter the version, to be a satisfactory solution. If it works, then it's done. Otherwise, move on to...
An unrestricted solve (what used to be default in Conda < 4.7). This frees up dependencies to be updated and will often result in the latest versions being installed unless there are previous explicit specifications on those packages.2
This strategy aims to provide a faster solve and install experience, by avoiding having to change anything in your environment. It also helps keep the environment stable by avoiding unnecessary version changes.
Specific Failure in Question
What happened in OP's case? One of the dependencies requirements of OpenCV was likely newer in v4.1.1 than what was already installed, but that dependency's version was compatible with installing OpenCV 3.4.2. Hence, the only thing that would change was adding opencv plus missing dependencies. Technically, this is a valid solution since one only asked for some version of opencv to be installed.
Getting the Latest Version
Option: Specifying the Version
If you know you want a specific version then you can always specify it
conda install -c conda-forge opencv=4.1.1
and since Conda can't install this without updating something in your env, the first round of solve will fail, and the full solve will get it for you.
Option: Skip the Freeze
Of course, you may not always know what the latest version number is and don't want to have to look this up on Anaconda Cloud every time. Fortunately, there is the --update-deps flag that essentially skips over the first solve stage and goes straight to the full solve. This will install the latest version for your system, as well as update any of the dependencies.
conda install --update-deps -c conda-forge opencv
Important Note: The --update-deps flag has a side-effect of converting dependencies to explicit specifications. While this is an internal environment state (managed through <env>/conda-meta/history), it does have some behavioral consequences (bugs!):
the result of the conda env export --from-history command will subsequently include all packages, instead of just the ones the user explicitly requested in the past
conda remove will not be able to prune dependencies; e.g., if scipy was installed, it would pull in numpy; if only scipy depended on numpy and scipy was removed, normally numpy would also get removed. This wouldn't work after using the --update-deps flag.
[1]: The behavior here depends on the channel_priority configuration option. With the strict setting, conda-forge would be prioritized over other channels; with the flexible setting, it is simply added to the list and the latest compatible version from any channel is selected.
[2]: One can check the explicit specifications of an environment with conda env export --from-history.

ImportError: cannot import name 'STL' from 'statsmodels.tsa.seasonal'

I have this issue now, I cannot import STL from statsmodels. I've tried to uninstall statsmodels as it was recommended somewhere with a similar issue but it is not possible, at least the way I do it:
!pip uninstall statsmodels - NOT working.
It seems that the STL function from statsmodels is not included in the latest stable version of the library (0.10.2) but is in the dev version (0.11.0dev0).
You can build and install this specific version with this command: pip install git+https://github.com/statsmodels/statsmodels.git
For this you may need a c compiler if you don't already have one, everything is explained here: https://www.statsmodels.org/dev/install.html#installation-from-source
I've also found this package that seems promising: https://github.com/jrmontag/STLDecompose
Use this:
pip install statsmodels==0.12.1

OpenMDAO installation

I need openmdao on windows 8 to run an aerostructutal optimization code that uses it but I’m having issues in the installation process. I installed numpy and scipy through pip in the cmd and then also openmdao using pip install openmdao but when I try to run a .py with copied inside the code at the bottom of this page, I get an error about “Component” not being found to import. What am I doing wrong ?
Some codes are written for a specific version of OpenMDAO. If you are using OpenAeroStruct, it requires OpenMDAO 1.7.4, not OpenMDAO 2.2.x.
To obtain the correct version, you would need to use the command pip install openmdao==1.7.4 or to download and install the source directly from here: https://github.com/OpenMDAO/openmdao1, following the instructions on the README, not on readthedocs.

R: can rpm files be used with Windows for possibly outdated R packages?

I was trying to run code that required the R packages ‘pkgDepTools’ and ‘Rgraphviz’. I received error messages saying that neither package is available for R version 2.15.0.
A Google search turned up the following webpage RPM Pbone that seems to have the packages:
http://rpm.pbone.net/index.php3/stat/4/idpl/17802118/dir/mandrake_other/com/R-pkgDepTools-1.20.0-1-mdv2012.0.i586.rpm.html
and
http://rpm.pbone.net/index.php3/stat/4/idpl/17802080/dir/mandrake_other/com/R-Rgraphviz-1.32.0-2-mdv2012.0.i586.rpm.html
However, the files have an *.rpm extension rather than the *.tar.gz or *.zip extensions I am used to.
I am using Windows 7 and R version 2.15.0. Can I install an R package from an *.rpm file?
From Wikipedia *.rpm seems like maybe it is more for Linux:
http://en.wikipedia.org/wiki/RPM_Package_Manager
Regarding other possible solutions, I have found several earlier posts here with similar questions about installing R packages that are not available for the most recent version of R:
Bivariate Poisson Regression in R?
Package ‘GeneR’ is not available
R Venn Diagram package Venerable unavailable - alternative package?
I have installed the latest version of Rtools and the package 'devtools'. Although I know nothing about them.
There is an archived version of 'Rgraphviz' here:
http://cran.r-project.org/src/contrib/Archive/Rgraphviz/
but I cannot locate an archived version of 'pkgDepTools'.
If I can install the packages on a Windows machine using the above *.rpm files could someone please provide instructions?
If I must use Rtools to build them I might ask more questions because the instructions at the link below are challenging for me:
http://cran.r-project.org/doc/manuals/R-admin.html#Building-from-source
To be completely transparent I am hoping someone might build them for me, if that is possible. Although I recognize the experience and knowledge gained from doing it myself would probably pay off in the long run.
Thank you for any advice.
pkgDepTools and Rgraphviz are BioConductor R packages not ones hosted on CRAN. Unless you configure your R to download packages from those repos, R will report that they are not available; it can only install from repos it has been configured to install from.
To install those BioConductor packages a lite installation method is provided:
source("http://bioconductor.org/biocLite.R")
biocLite(c("pkgDepTools", "Rgraphviz"))
Further details are provided on the Install page of the BioConductor website
In general you can't use rpm packages on Windows; rpm's are the equivalent of a binary package for Linux. Any C/C++/Fortran/etc code will have been compiled for Linux not Windows. If a package really isn't available for your version of R then check if there is a reason stated on CRAN (usually Windows binaries take a few days longer to produce or there may be requirements for software not available on the CRAN Windows build machines). You can try the WinBuilder service run by Uwe Ligges to build Windows Binaries of packages for you, but if the package was on CRAN and now isn't that suggests it no longer works with current R and can not be built.
In general try a wider search for packages; the first hit in my Google search results under the search string "pkgDepTools" is the Bioconductor page for the package which includes a link to the Windows binary and instructions on how to install the package from within R.
I think this merits an answer rather than a comment.
A gentleman at Bioconductor helped me get Rgraphviz installed. The primary problem was that the version of Rgraphviz I had downloaded only seems to work with the 32-bit version of R and I was running a 64-bit version of R. I was able to install Rgraphviz in the 32-bit version of R.
I had also made an error or two in the PATH statement during some of my attempts to install Rgraphviz. However, the post above in my second comment provides the instructions for installation.
You just, it seems, cannot install the normal download version of Rgraphviz in the 64-bit version of R.
I think many of our emails back and forth are now posted on the Bioconductor forum.
I might edit this answer with more detailed instructions in the next 24-hours.

Resources