1

I'm working in python3 on Fedora 27 and I was trying to install the Theano package through pip3. The package is easier installed through anaconda3 so I then installed anaconda. Afterwards, DNF and YUM started returning the following on any call:

Traceback (most recent call last):
File "/usr/bin/dnf", line 57, in <module>
from dnf.cli import main
File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 31, in 
<module>
import dnf.base
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 26, in 
<module>
from dnf.comps import CompsQuery
File "/usr/lib/python3.6/site-packages/dnf/comps.py", line 29, in 
<module>
import dnf.util
File "/usr/lib/python3.6/site-packages/dnf/util.py", line 32, in 
<module>
import librepo

From my search, people suggested reinstalling python3 using this code which returns:

[ajwinters@localhost ~]$ sudo yum-deprecated reinstall python3
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

File "/usr/libexec/urlgrabber-ext-down", line 28
  except OSError, e:
                  ^
SyntaxError: invalid syntax
  File "/usr/libexec/urlgrabber-ext-down", line 28
    except OSError, e:
                  ^
SyntaxError: invalid syntax
  File "/usr/libexec/urlgrabber-ext-down", line 28
    except OSError, e:
                  ^
SyntaxError: invalid syntax
  File "/usr/libexec/urlgrabber-ext-down", line 28
    except OSError, e:
                  ^
SyntaxError: invalid syntax
  File "/usr/libexec/urlgrabber-ext-down", line 28
    except OSError, e:
                  ^
SyntaxError: invalid syntax


Exiting on user cancel

DNF YUM and YUM-Deprecated are not currently working for me.

Let me know what information I can provide to help solve this problem.

I've been doing everything through the terminal so I think that's where I messed something up. Here is the relevant history:

  605  pip install pymc3
  606  pip install --user pymc3
  607  pip install --user pymc3 numdifftools statsmodels
  608  source env/bin/activate
  609  juptyer notebook
  610  jupyter notebook
  611  source env/bin/activate
  612  jupyter notebook
  613  python3
  614  python
  615  pip3 install pymc3 numdifftools statmodels
  616  pip3 install pymc3 numdifftools statsmodels
  617  pip3 install --user pymc3 numdifftools statsmodels
  618  pip3 install --user patsy theano
  619  pip3 install --user patsy theano matplotlib numpy scipy pandas
  620  conda install mingw libpython
  621  pip3 install --user theano
  622  pip3 install --user theano pymc3
  623  source activate/bin/env
  624  source env/bin/activate
  625  jupyter notebook
  626  conda
  627  python3
  628  python
  629  conda install theano
  630  pip3 install --usesr theano
  631  pip3 install --user theano
  632  nvidia-docker
  633  sudo nvidia-docker run -it kaixhin/cuda-theano:7.0
  634  sudo dnf install nvidia-docker
  635  sudo dnf install nvidia-docker2
  636  python3 -c 'import theano: print(theano.config)' | less
  637  python3 -c 'import theano; print(theano.config)' | less
  638  python3
  639  conda install mingw libpython3
  640  conda install mingw libpython
  641  pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git --install-option='--prefix=~/.local':
  642  pip3 install --upgrade --no-deps git+git://github.com/Theano/Theano.git --install-option='--prefix=~/.local':
  643  python3
  644  pip3 install --user theano
  645  python3
  646  cd /home/ajwinters/.local/lib/python3.6/site-packages/theano/
  647  ls
  648  conda install scipy numpy BLAS
  649  conda install scipy numpy 
  650  cd ..
  651  cd /
  652  python3
  653  conda install numpy scipy mkl <nose> <sphinx> <pydot-ng>
  654  conda install numpy scipy mkl
  655  conda install numpy scipy mkl /usr
  656  conda install /usr numpy scipy mkl 
  657  conda install numpy scipy mkl
  658  anaconda3
  659  sudo dnf install anaconda3
  660  conda3 install /usr numpy scipy mkl 
  661  conda list
  662  conda install scipy
  663  conda create -n py37 python=3.7 anaconda
  664  conda create -n py36 python=3.6 anaconda
  665  source activate py36
  666  python3
  667  conda install theano py36
  668  conda install theano py36_env
  669  conda install theano -n py36_env
  670  conda install theano -n py36
  671  python3
  672  conda install numpy scipy mkl
  673  Anaconda3-4.3.1-Linux-x86_64.sh
  674  cd /home/ajwinters/
  675  ls
  676  cd /
  677  cd /usr/
  678  ls
  679  cd -a
  680  ls -a
  681  sudo chown -R usr foldername
  682  sudo conda install numpy scipy mkl
  683  python3
  684  cd/
  685  cd /
  686  ls
  687  history | grep source
  688  source env//bin/activate
  689  source env/bin/activate
  690  ls
  691  cd 
  692  ls
  693  cd env/bin/activate
  694  cd env/
  695  ls
  696  cd bin/
  697  ls
  698  activate
  699  source activate
  700  exit
  701  pip3 intall --upgradepip install --upgrade --no-deps git+git://github.com/Theano/Theano.git --user  # Need Theano 0.8 or more recent
  702  pip3 install --upgrade --no-deps git+git://github.com/Theano/Theano.git --user  # Need Theano 0.8 or more recent
  703  source env/bin/activate
  704  jupyter notebook
  705  source /env/bin/activate
  706  source env/bin/activate
  707  jupyter
  708  history | grep notebook
  709  jupyter notebook
  710  exit
  711  pip3 install jupyter
  712  source env/bin/activate
  713  jupyter notebook
  714  pip3 install jupyter
  715  jupyter notebook
  716  exit
  717  pip3 install jupyter
  718  pip3 install --user jupyter
  719  jupyter notebook
  720  conda update
  721  conda update --all
  722  sudo conda update --all
  723  jupyter notebook
  724  pip3 update 
  725  pip3 --update 
  726  pip3 --updateall
  727  jupyter notebook
  728  source activate py36
  729  pip install jupyter
  730  jupyter notebook
  731  printenv
  732  printenv | grep py36
  733  printenv
  734  cd
  735  ls
  736  sudo dnf update
  737  update
  738  dnf update
  739  dnf upgrade
  740  dnf search steam
  741  dnf search
  742  dnf
  743  dnf upgrade
  744  pip3 update
  745  pip3 upgrade
  746  pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U
  747  cd /usr/bin/dnf
  748  ls
  749  edit /usr/bin/dnf
  750  cd /usr/bin/
  751  ls
  752  ls | grep python
  753  python3.6
  754  history | grep py36
  755  source deactivate py36
  756  steam
  757  python3
  758  dnf install

Line 758 is where the problem first arrived.

4

0 回答 0