Creating\Updating conda venv with yml file fails in pip dependencies part with gym[rom] - pip

Im trying to create a virtual enviorment based on an enviorment.yml file with the command:
"mamba env update -f environment.yml -n cs236781-hw".
The yml file contains this part:
- pip:
- nbmerge
- gym[atari,accept-rom-license,box2d]==0.21.0
which seems to fail as I get this error in my minicinda prompt:
Building wheel for AutoROM.accept-rom-license (pyproject.toml): started
Building wheel for AutoROM.accept-rom-license (pyproject.toml): finished with status 'error'
Failed to build AutoROM.accept-rom-license
Pip subprocess error:
error: subprocess-exited-with-error
× Building wheel for AutoROM.accept-rom-license (pyproject.toml) did not run successfully.
ImportError: DLL load failed while importing libtorrent: The specified module could not be found.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
failed
CondaEnvException: Pip failed
Ive tried so many things to fix this (reinstalling conda, python even vscode and its c++ build tools) with no success.
Does anyone have any clue?

I assume you are working on Windows x64?
If yes, you will probably need OpenSSL 1.1.x.
Please try to install e.g. Win64OpenSSL_Light-1_1_1s.exe first, to get the required SSL libraries.
https://slproweb.com/products/Win32OpenSSL.html
Regards,
Konstantin

Related

Requirements file didn't install

i have an error when i want to install package_name
they didn't want to install, like when i want to install a pakhage like instabot i say an error when it installing, it say you have an error like this:
error: could not create 'C:\Python311\LICENSE': Permission denied
[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.
╰─> huepy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
so that;s the error, and when i want to fix it i tried to install requirements.txt again but they say you have an error again again again...
that when i put:
pip install -r requirements.txt
the error say:
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
can anyone plz give an advice

how to download sent2vec library

So I'm trying to download sent2vec (this one: https://github.com/epfml/sent2vec) on windows, and I have issues with that.
to my understanding, pip installs won't work because it will get a different package with the same name.
I tried to download the library by manually git cloning the sent2vec and fastText libraries and then using pip install . (I got the idea from another thread).
When trying to pip install sent2vec, I get this error:
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.17.1 in c:\python38\lib\site-packages (from sent2vec==0.0.0) (1.24.0)
Requirement already satisfied: Cython>=0.29.13 in c:\python38\lib\site-packages (from sent2vec==0.0.0) (0.29.32)
Building wheels for collected packages: sent2vec
Building wheel for sent2vec (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for sent2vec (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x86\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sent2vec
Failed to build sent2vec
ERROR: Could not build wheels for sent2vec, which is required to install pyproject.toml-based projects
sent2vec requires Facebook's FastText library which builds on Unix (Linux distributions and modern Mac OS). The list of compiler flags is clearly for GCC, they don't work with MSVC.
The bottom line is: the library cannot be built on w64.
sent2vec repository includes a Dockerfile so you can try to use Docker. Or you can try WSL2. Both the Dockerfile and WSL2 run Ubuntu, a Linux distribution.
Upd. The Dockerfile was not updated in 3 years, last commit was on Aug 29, 2019, so it's a bit outdated. The simplest fix currently seems to be editing it after cloning and setting a version in the 1st line: make it FROM ubuntu:18.04

Error installing Geoviews (cartopy) on Windows

after started using and learning Holoviews-Panel-HvPlot, I'd like to learn Geoviews. Unfortunatly, problems started when I tried to install it. Down below the message. Just some more details:
I'm a Windows 10 user
My Python version is 3.10.4
I've just pip3.10 installed last versions of both Geos and Proj (as in the error message)
I've read that Geoviews requires some out of python extensions that I can't get with 'pip' but I have no idea what we're talking about
Someone suggested to use a virtual environment for Anaconda but I don't use it. Moreover,I'd prefer having it installed in my general environment as I hope to use it often in the future.
Anyway, here the Error Message:
Collecting cartopy>=0.18.0
Using cached Cartopy-0.20.3.tar.gz (10.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
<string>:117: UserWarning: Unable to determine GEOS version. Ensure you have 3.7.2 or later installed, or installation may fail.
<string>:166: UserWarning: Unable to determine Proj version. Ensure you have 8.0.0 or later installed, or installation may fail.
Proj version 0.0.0 is installed, but cartopy requires at least version 8.0.0.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for skranger

I am trying to install the package skranger using pip install skranger. However, I get an error ERROR: Could not build wheels for skranger, which is required to install pyproject.toml-based projects.
In the traceback, I also see an error ModuleNotFoundError: No module named 'setuptools'. However, setuptools is already installed.
I have tried related solutions already on stackoverflow, but have yet to find a solution. Any help would be greatly appreciated!

Tidal Cycles cabal install failure

I'm trying to install tidal cycles to program live music - but am running into errors when running cabal install tidal via cmd
Logs:
Resolving dependencies...
Downloading mwc-random-0.14.0.0
Starting network-3.0.1.0
Downloaded mwc-random-0.14.0.0
Starting mwc-random-0.14.0.0
Failed to install network-3.0.1.0
Build log ( C:\Users\Moz\AppData\Roaming\cabal\logs\ghc-8.6.3\network-3.0.1.0-KyWTN8R07Nk13a65qAf8xd.log ):
Configuring network-3.0.1.0...
cabal.exe: The package has a './configure' script. If you are on Windows, This
requires a Unix compatibility toolchain such as MinGW+MSYS or Cygwin. If you
are not on Windows, ensure that an 'sh' command is discoverable in your path.
cabal: Leaving directory 'D:\Temp\TMP\cabal-tmp-7496\network-3.0.1.0'
Building mwc-random-0.14.0.0
Completed mwc-random-0.14.0.0
cabal: Error: some packages failed to install:
hosc-0.17-Gak1PuEPYn3IoGtbGyt03X depends on hosc-0.17 which failed to install.
network-3.0.1.0-KyWTN8R07Nk13a65qAf8xd failed during the configure step. The
exception was:
ExitFailure 1
tidal-1.0.7-G7PMBDSlH0ZK2qQ3UODU3y depends on tidal-1.0.7 which failed to
install.
Cheers for any help
All good, needed to add these lines to config file:
extra-prog-path: C:\Program Files\Haskell Platform\8.6.3\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.6.3\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.6.3\mingw\include
Cheers anyhow

Resources