Creating Virtual Environment with Python 3.11 Returns an Error - python-venv

I got an error when creating virtualenv with Python 3.11 interpreter.
I typed this in my terminal
python3.11 -m venv env
It returned this:
Error: Command '['/home/bambang/env/bin/python3.11', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
What's possibly missing?

I tried to add --without-pip flag. It doesn't return an error so far

Related

Snowflake put command throws HTTPError('400 Client Error: Bad Request for url - )

I am receiving below error while using put command and uploading file on snowflake.
It is Error 400
It works for other files but fails for only one file with below error.
Error link - https://sfc-uk-ds1-customer-stage.s3.amazonaws.com/drko-s-ukss0127/tables/2323577421858/FACT_RFM_SEGMENTATION.csv?partNumber=83&uploadId=PosKnuUecwKdJdFOQopotAdcwdk2IJ2wtgwsrvbDD_mSas7L.vD.7Bz8bXX1M_QAZKyVWiaxdf5I6ime9FWSwQHI0BpV17WGVRgfpMSd5_hhm92jNGI3a2JrRiTvsblz
Snowflake Put command -
user_details#XSMALL_WHSE#DEV_DB.FACT>put file://D:\snowflake\lab_db_csv_files\file_name.csv #"FACT".%"table_name" auto_compress=False;
I tried with both Auto_compress False and True. but it is not working in any case.
I remember one of the versions had an issue with the PUT command.
Check your current version by running:
snowsql --version
Then try to use different versions:
snowsql --version 1.2.18
Above command will launch SnowSQL using version 1.2.18, then test again.

Setting {WSL::Bash} as default shell throws an error in cmder

note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
This is error i am getting.
Also i have set the fish shell as default shell in WSL.
For WSL1 on windows 10 build later than 1909 (yes wsl2 is available to me but for corporate reasons i cant use it)
Try setting your command to wsl.exe -new_console:d:C:\_stuff\code -cur_console:p5 and the task parameters to /dir "c:/_stuff/code" /icon "c:/_distros/ubuntu/ubuntu1804.exe"
You may need to change the file locations to make the command and parameters suitable for your setup. c:/_stuff/code is where i keep all my repositories and c:/_distros/ubuntu is where i have installed ubuntu.

Python tests discovery fails with remote.ssh + conda env

I'm using vcsode on windows with Remote SSH to develop python code hosted on linux.
My python environment is a conda env based on python3.7.
During the test discovery stage, the run_adapter.py script is launched and fails with the following log:
python /home/scharlois/.vscode-server/extensions/ms-python.python-2020.2.64397/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir /path/to/my/project -s --cache-clear tests
Test Discovery failed:
Error: ERROR 1: PROJ: proj_create_from_database: Open of /home/scharlois/.conda/envs/conda37/share/proj failed
I have no error when I execute the same command in the conda env. on the remote host
Which interpreter is used to run the run_adapter.py script? Is the conda python one ?
It is the python conda interpreter. (displayed modifying the run_adapter script)
I found a workaround: inserting in the script the folowing lines before the main execution:
import os
os.environ["PROJ_LIB"]=""

WebDriverException: Message: invalid argument: can't kill an exited process in a Docker container returns odd errors

I'm running a small Python script that scrapes some data from a public website.
When I run the Dockerfile instructions line by line in an interactive terminal using the selenium:latest image the script runs fine.
docker run -it -v /Users/me/Desktop/code/scraper/:/scraper selenium/standalone-firefox bash
As soon as I run it using my Dockerfile and docker-compose file I get this error:
app_1 | selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
I am using the MOZ_HEADLESS=1 env var. It's being passed properly.
I have tried running the script as someone other than root but then I get log errors.
Dockerfile
FROM selenium/standalone-firefox:latest
# https://github.com/SeleniumHQ/docker-selenium/issues/725
USER root
RUN apt-get update -y
RUN apt-get install -y firefox python-pip
WORKDIR /scraper
COPY . /scraper
RUN pip install -r /scraper/requirements.txt
ENV MOZ_HEADLESS=1
CMD ["python", "/scraper/browserscraper.py"]
If I run those instructions in the Dockerfile from an interactive terminal, I have no problems.
It either has to do with the user being root running the script via the Dockerfile or something about it missing a screen for output because I'm not actually SSH'ed in like I am running it from the command line with -it.
Any ideas?

Permissions denied

I'am trying to create a package for iOS with kivy.:https://kivy.org/docs/guide/packaging-ios.html
I try to run: ./toolchain.py build kivy in terminal on mac.
Error: sudo: unable to execute ./toolchain.py: Permission denied.
My python is setup in anaconda and is running correctly.
In the first line of ./toolchain.py is: #!/anaconda/envs/python2/bin python2.7
Anyone knows how to change the permissions/how to get it to work?
When I set python to default: /usr/bin/env and adjust first line of ./toolchain.py it does execute, but in default python I'am not able to install pip.
Ensure ./toolchain.py got execution bit set (chmod a+x toolchain.py)