Python Virtual Environment - cannot open shared file - python

I have just started learning python and I am having issues to create a virtual environment. With virtualenv, I am getting the following error:
New python executable in /home/charles/Desktop/test/test/bin/python
/home/charles/Desktop/test/test/bin/python: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
ERROR: The executable /home/charles/Desktop/test/test/bin/python is not functioning
ERROR: It thinks sys.prefix is '/home/charles/Desktop/test' (should be '/home/charles/Desktop/test/test')
ERROR: virtualenv is not compatible with this system or executable
With "venv" and I got the following error:
Error: Command '['/home/charles/Toto/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
I am using python 3.6.1 and the zsh shell with Ubuntu 17.04 64-bit (gnome).

Related

Issues installing python package on windows

I'm trying to install python-rocksdb on a windows 10 machine and I'm coming across some issues with the install.
I have successfully installed rocksdb first using the vcpkg method.
When running pip install python-rocksdb I get the following error:
cl : Command line error D8021 : invalid numeric argument '/Wextra'
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
Looking around suggested attempting to install with GCC or G++, so I downloaded cygwin and then attempted to install the python package using
pip install --global-option build_ext --global-option --compiler=cygwin python-rocksdb which yielded the following error:
gcc: error: unrecognized command-line option ‘-mcygwin’
error: command 'C:\\cygwin64\\bin\\gcc.exe' failed with exit code 1
This post seems to suggest that you need to use g++ specifically, but it looks like the cygwin command is defaulting to gcc.
Just note that I'm not using the virtual env with python.
Any assistance is greatly appreciated.

Nuitka shows error: FATAL: Error, unknown plug-in 'librosa' referenced when compiling programm

I am trying to compile my python program with Nuitka but it returns the error: FATAL: Error, unknown plug-in 'librosa' referenced. when run with the following command:
python -m nuitka --standalone --enable-plugin=tk-inter --enable-plugin=numpy --enable-plugin=librosa --enable-plugin=matplotlib program.py

Error [WinError 87] when installing Kivy on Windows 7

I'm following the instructions here https://saas1907y5.saas-secure.com/projects/pitanga-square/wiki on a computer running Windows 7.
When I have to execute py -m pip install kivy[base] kivy_examples I get the following error:
ERROR: Error [WinError 87] The parameter is incorrect while executing command python setup.py egg_info
ERROR: Could not install packages due to an OSError: [WinError 87] The parameter is incorrect
I tried reinstalling Python 3.6.5 and it didn't solve.
Also, when I run the next command py -m virtualenv env I get another error:
RuntimeError: failed to query D:\pitanga-v21.08 with code 13 err: 'Access is denied'
My guess was that there was something wrong with the permissions Python has, so I opened the folder properties -> security and gave full control to everything, that didn't fix it. Instead I got another error:
Error: [Errno 2] No such file or directory: ''
For the record, I tried following the same steps on a Windows Vista machine I have here and (even though it's not officially supported) it worked fine.

How can i solve "architecture not supported" when installing flask_mysqldb in venv

i got this error when i run pip install flask-mysqldb in my project venv:
In file included from MySQLdb/_mysql.c:29:
In file included from /usr/local/Cellar/mysql/8.0.23_1/include/mysql/mysql.h:46:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h:37:2: error: architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1
I have python 3.8.2
It seems that you have a MacOS. Check which clang are you using, as it seems that it is the source of your error. If it shows you some error when trying to run the clang command directly from your console, try to do a fresh Xcode installation with xcode-select --install. By doing so, maybe you can run now the clang command without errors, and therefore, install the pip library.
Check this post for more details.

''Error input output while excuting Python"

I have installed Pyton on centos 7 and when I tried to excuse the command Python I got the error:
./python3: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
So I have installed the package: glibc-2.17-196.el7.i686.rpm
But it didn't install the file ld-linux.so.2 so I copied it directly to lib after that I am now getting the following error:
./python3: Input/output error

Categories

Resources