Ubuntu 20.04 upgrade, Python missing libffi.so.6

后端 未结 6 1538
暗喜
暗喜 2021-02-06 20:59

I recently upgraded my OS to Ubuntu 20.04 LTS.

Now when I try to import a library like Numpy in Python, I get the following error:

ImportError: libffi.so.6         


        
6条回答
  •  温柔的废话
    2021-02-06 21:47

    I had the same problem (when I upgrded to Ubuntu 20.04) when I tried to run Jupyter Notebook.

    Step 1) --> Just re-install python3.7.6 (the version I was using) :

    $ cd path_to_python3.7_folder
    
    • Do again de installation process:
        $ ./configure --enable-optimizations
        $ make
        $ sudo make install
    

    1. Step 2: uninstall jupyter. I used pip3.7 uninstall ... See: How to uninstall Jupyter note book installed by pip3

    2. Step 3: Re-install jupyter again:

        $ pip3.7 install jupyterlab
        $ pip3.7 install notebook
    

    Try to run jupyter again. It should work.

提交回复
热议问题