Error when creating virtual environment

Post Reply

Topic author
madx86
Member
Posts: 5
Joined: Sat Mar 23, 2024 3:11 pm
Reputation: 0
Status: Offline

Error when creating virtual environment

Post by madx86 » Sat Mar 23, 2024 3:18 pm

I am getting the below error when creating a virtual environment , if anyone has seen this before please provide suggestions on how to resolve it

Python 3.10.0 (default, Oct 17 2022, 09:12:23) [C] on OpenVMS HP Integrity BL890c

Code: Select all

DEV22>python -m venv t1
Error: [Errno 65535] bad file version number: '/USERDISK67/madx86/py/venv/t1/lib/python3.10'
DEV22>


sms
Master
Posts: 349
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Error when creating virtual environment

Post by sms » Sat Mar 23, 2024 3:50 pm

Code: Select all

> I am getting the below error when creating a virtual environment [...]

   That tells me very little about what you're doing.

> [...] if anyone has seen this before [...]

   Not I, but ...

> Python 3.10.0 (default, Oct 17 2022, 09:12:23) [C] on OpenVMS HP
> Integrity BL890c

   VMS version?  show system /noproc

> Error: [Errno 65535] bad file version number:
> '/USERDISK67/madx86/py/venv/t1/lib/python3.10'

   What's the actual name of that file?  If it's anything involving
"3.10.0", then it might have too many dots in it.

   First guess:

      show process /parse_style

      set process /parse_style = extended
      
         In the modern world, I'd suggest adding that setting to a LOGIN.COM
(or SYLOGIN.COM).


dgordon
VSI Expert
Active Contributor
Posts: 37
Joined: Tue May 09, 2023 7:57 am
Reputation: 1
Status: Offline

Re: Error when creating virtual environment

Post by dgordon » Sat Mar 23, 2024 5:39 pm

Is the device in question ODS-5? You can't have a.b.c.txt (for example) on an ODS-2 volume.

$ SHOW DEVICE/FULL disk-name

will show you the structure level.
Executive Vice President of InfoServer Engineering at VSI.


craigberry
Contributor
Posts: 23
Joined: Fri Nov 17, 2023 11:27 am
Reputation: 1
Status: Offline

Re: Error when creating virtual environment

Post by craigberry » Sat Mar 23, 2024 7:15 pm

Check the setting of DECC$EFS_CHARSET. I'm pretty sure that has to be enabled for those dot-separated numbers to be recognized as part of the name rather than a version number.


sms
Master
Posts: 349
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Error when creating virtual environment

Post by sms » Sun Mar 24, 2024 1:54 am

Code: Select all

> Check the setting of DECC$EFS_CHARSET. [...]

   Ideally, the program itself would be setting such things on its own,
rather than expecting the user to clutter/corrupt his own environment
with a bunch of DECC$whatever definitions.

   However, I haven't looked at Python on VMS for years (and hardly
then), so I have no actual knowledge of what it might do about those
things.

   Question for someone who knows more than nothing:

   Shouldn't there be something which could be done in Python to reveal
any/all active DECC$whatever definitions?


Topic author
madx86
Member
Posts: 5
Joined: Sat Mar 23, 2024 3:11 pm
Reputation: 0
Status: Offline

Re: Error when creating virtual environment

Post by madx86 » Mon Mar 25, 2024 8:11 pm

dgordon wrote:
Sat Mar 23, 2024 5:39 pm
Is the device in question ODS-5? You can't have a.b.c.txt (for example) on an ODS-2 volume.

$ SHOW DEVICE/FULL disk-name

will show you the structure level.

Code: Select all

SHOW DEVICE/FULL USERDISK67

  Volume Status:  ODS-2, subject to mount verification, write-through XFC
      caching enabled, write-back XQP caching enabled.
the disk where I am trying to execute the "venv" command seems to be ODS-2 , let me try this on ODS-5 and get back . Thanks .

User avatar

arne_v
Master
Posts: 347
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Online
Contact:

Re: Error when creating virtual environment

Post by arne_v » Mon Mar 25, 2024 9:04 pm

My perspective is:
* a lot of the new stuff (Java, Python etc.) only works on ODS-5
* there are not really any downside of ODS-5
so I suggest that you just start going ODS-5 on all disks. ODS-2 RIP.
Arne
arne@vajhoej.dk
VMS user since 1986


Topic author
madx86
Member
Posts: 5
Joined: Sat Mar 23, 2024 3:11 pm
Reputation: 0
Status: Offline

Re: Error when creating virtual environment

Post by madx86 » Mon Mar 25, 2024 9:43 pm

we installed python on ODS-5 but forgot that my local directory where venv was creating file was on ODS-2 ! .
Switching my local directory to ODS-5 disk resolved this issue :geek:


sergey_vorfolomeev
VSI Expert
Master
Posts: 101
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: Error when creating virtual environment

Post by sergey_vorfolomeev » Tue Mar 26, 2024 4:02 am

Python DECC logical names set at the start (just for information)

Code: Select all

    set ("DECC$UNIX_LEVEL", 100);

    const char *disable_feature[] = {
        "DECC$EFS_CASE_SPECIAL",
        "DECC$DETACHED_CHILD_PROCESS",
        "DECC$POSIX_STYLE_UID",         // else getpwuid() doesn't work
    };

    const char *enable_feature[] = {
        "DECC$EFS_FILE_TIMESTAMPS",
        "DECC$ENABLE_GETENV_CACHE",
        "DECC$EXIT_AFTER_FAILED_EXEC",
        "DECC$FILE_SHARING",
        "DECC$MAILBOX_CTX_STM",
        "DECC$POPEN_NO_CRLF_REC_ATTR",
        "DECC$POSIX_SEEK_STREAM_FILE",

        "DECC$ARGV_PARSE_STYLE",
        "DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION",
        "DECC$EFS_CASE_PRESERVE",
        "DECC$EFS_CHARSET",
        "DECC$FILENAME_UNIX_NO_VERSION",
        "DECC$FILENAME_UNIX_REPORT",
        "DECC$READDIR_DROPDOTNOTYPE",
        "DECC$RENAME_NO_INHERIT",
    };


Topic author
madx86
Member
Posts: 5
Joined: Sat Mar 23, 2024 3:11 pm
Reputation: 0
Status: Offline

Re: Error when creating virtual environment

Post by madx86 » Fri Mar 29, 2024 11:44 am

I am creating a virtual env on a ODS-5 disk with SPECIAL files enabled but I am still getting this error , any suggestions on how to resolve this :roll: . I posted this in another thread but did not get any response , so just posting it here for assistance .

Code: Select all

node1>python -m venv t3
Error: Command '['/PYTHON/USER1/PY/t3/bin/python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

node1>show dev python /full
*
*
 Volume Status:  ODS-5, subject to mount verification, write-through XFC
      caching enabled, write-back XQP caching enabled, special files enabled.
*
*

node1>sh sys/noproc/full
OpenVMS V8.4-2L1  on node node1   25-MAR-2024 18:48:59.97   Uptime  10 04:41:26
        HP BL890c i4  (2.53GHz/32.0MB)
		

node1>python
Python 3.10.0 (default, Oct 17 2022, 09:12:23) [C] on OpenVMS
Type "help", "copyright", "credits" or "license" for more information.
>>>

Post Reply