Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!!URGENT!! Error in conda Environment #27

Open
tusharrewatkar opened this issue May 16, 2024 · 2 comments
Open

!!URGENT!! Error in conda Environment #27

tusharrewatkar opened this issue May 16, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@tusharrewatkar
Copy link

I'm getting this error while creating conda envt on my windows system.

I tried to solve this issue from a closed issue but its not working for me.

It will be a great help if you can put a requirements.txt file because many users don't have access to conda in their organization.

Solving environment: failed

ResolvePackageNotFound:

  • openh264==2.1.1=h4ff587b_0
  • gmp==6.2.1=h2531618_2
  • zlib==1.2.11=h7f8727e_4
  • ninja==1.10.2=py37hd09550d_3
  • pip==21.2.2=py37h06a4308_0
  • lame==3.100=h7b6447c_0
  • x264==1!157.20191217=h7b6447c_0
  • libunistring==0.9.10=h27cfd23_0
  • libuv==1.40.0=h7b6447c_0
  • ffmpeg==4.2.2=h20bf706_0
  • lz4-c==1.9.3=h295c915_1
  • libstdcxx-ng==9.3.0=hd4cf53a_17
  • readline==8.1.2=h7f8727e_1
  • libgomp==9.3.0=h5101ec6_17
  • intel-openmp==2021.4.0=h06a4308_3561
  • certifi==2021.10.8=py37h06a4308_2
  • libwebp==1.2.0=h89dd481_0
  • mkl_random==1.2.2=py37h51133e4_0
  • sqlite==3.37.2=hc218d9a_0
  • pytorch==1.9.0=py3.7_cuda11.1_cudnn8.0.5_0
  • libtiff==4.1.0=h2733197_1
  • nettle==3.7.3=hbbd107a_1
  • ncurses==6.3=h7f8727e_2
  • jpeg==9b=h024ee3a_2
  • mkl==2021.4.0=h06a4308_640
  • freetype==2.11.0=h70c0345_0
  • xz==5.2.5=h7b6447c_0
  • numpy==1.20.2=py37h2d18471_0
  • libffi==3.3=he6710b0_2
  • ipython==7.22.0=py37hb070fc8_0
  • mkl_fft==1.3.1=py37hd3c417c_0
  • bzip2==1.0.8=h7b6447c_0
  • python==3.7.11=h12debd9_0
  • libopus==1.3.1=h7b6447c_0
  • lcms2==2.12=h3be6417_0
  • ca-certificates==2021.10.26=h06a4308_2
  • libidn2==2.3.2=h7f8727e_0
  • cryptography==36.0.0=py37h9ce1e76_0
  • numexpr==2.8.1=py37h6abb31d_0
  • libvpx==1.7.0=h439df22_0
  • libtasn1==4.16.0=h27cfd23_0
  • bottleneck==1.3.2=py37heb32a55_1
  • setuptools==58.0.4=py37h06a4308_0
  • zstd==1.4.9=haebb681_0
  • giflib==5.2.1=h7b6447c_0
  • openssl==1.1.1m=h7f8727e_0
  • numpy-base==1.20.2=py37hfae3a4d_0
  • ld_impl_linux-64==2.35.1=h7274673_9
  • _openmp_mutex==4.5=1_gnu
  • cffi==1.15.0=py37hd667e15_1
  • libgcc-ng==9.3.0=h5101ec6_17
  • brotlipy==0.7.0=py37h27cfd23_1003
  • gnutls==3.6.15=he1e5248_0
  • libpng==1.6.37=hbc83047_0
  • pillow==8.4.0=py37h5aabda8_0
  • tk==8.6.11=h1ccaba5_0
  • cudatoolkit==11.1.74=h6bb024c_0
  • mkl-service==2.4.0=py37h7f8727e_0
  • pandas==1.3.3=py37h8c16a72_0
@usert5432 usert5432 self-assigned this May 17, 2024
@usert5432 usert5432 added the enhancement New feature or request label May 17, 2024
@usert5432
Copy link
Collaborator

Hi @tusharrewatkar,

It will be a great help if you can put a requirements.txt

Thank you for bringing this issue to our attention! This would indeed be a good improvement. Currently, we are traveling and unable to address this immediately. However, we plan to generate a proper requirements.txt at the beginning of next week.

@pphuangyi
Copy link
Contributor

pphuangyi commented Jun 6, 2024

Hi @tusharrewatkar,

I am sorry for the late reply. It took me quite some time to figure out a solution with the virtual environment approach.

I also want to apologize that I only have experience with Linux (Ubuntu x86_64 to be more specific) and the following solution is written for Linux only. You will have to find Windows equivalent to the actions needed.

Working with a virtual environment

IMPORTANT NOTE: The following approach only works for python3.{7,8}, so please ensure you have a proper python version installed before proceeding. A Python version that is too high will cause pip installing torch1.9.0 and torchvision1.10.0 to fail. However, we need the specific versions of torch and torchvision for reproducibility.

Step 0: Prerequisites

  1. You need to have either python3.7 or python3.8 installed. From now on, we assume python3.8 is used. Make sure that your Python has the two submodules: venv and pip. If you are not sure, try running
python3.8 -m venv --help

and

python3.8 -m pip --help

to see whether help information shows up.

  1. You need to have cuda toolkit 11.1. On Linux you can get it by running
sudo apt install cuda-11-1

To check whether cuda 11.1 is correctly installed, see whether there is a folder /usr/local/cuda-11.1.

Step 1: From the uvcgan source tree, run

python3.8 -m venv venv

This will create a virtual environment named venv under uvcgan source tree.

Step 2: Modify the ./venv/bin/activate file by adding the following 3 lines

export CUDA_HOME=/usr/local/cuda-11.1
export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-11.1/bin:$PATH

I put it after "export PATH", but other places may also work. This will ensure cuda 11.1 is used if you have multiple versions of cuda.

Step 3: From the uvcgan source tree, activate the virtual environment by running

source venv/bin/activate

Step 4: Make a file called requirements.txt containing the following lines:

Pillow
numpy
pandas
setuptools
tqdm

and install listed packages by running

pip install -r requirements.txt

This will install all required packages except torch and torchvision.

Step 5: Install torch and torchvision by running

pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html

Step 6: Install the uvcgan package by running

python setup.py develop

Step 7: When you are done working with uvcgan, exit the virtual environment by running

deactivate

Please contact us if more information is needed. Please also feel free to share your experience with Windows if you manage to make it work! This will help our Windows users greatly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants