Open nalsandori opened 5 months ago
Does this work?
ipy -X utf8 setup.py install
>>> import test
Trackback (most recent call last):
ImportError: No module named 'test'
c:\test>ipy -X utf8 pip uninstall test
Uninstalling test_package:
Would remove:
c:\program files\ironpython 3.4\lib\site-packages\test_package-py3.4.egg
Proceed (y/n)? Error: Exceptions
Traceback (most recent call last):
FIle "...\site-packages\pip\_internal\cli\base_command.py", line 178, in main status = self.run(options, args)
...
File "...\pip\_internal\req\req_uninstall.py", line 425, in _allowed_to_proceed
return ask('Proceed (y/n)? ', ('y', 'n')) == 'y'
File "...\pip\_internal\utils\misc.py", line 183, in ask response = input(message)
Lookyperror: unknown encoding: ks_c_5601_1987
For the import error I'm not sure. Looking at the uninstall error I guess you package is an egg
file? Does it appear in your sys.path
? For example:
['.', 'C:\\Program Files\\IronPython 3.4\\lib', ..., 'C:\\Program Files\\IronPython 3.4\\lib\\site-packages', 'C:\\Program Files\\IronPython 3.4\\lib\\site-packages\\mytest-0.1-py3.4.egg']
I don't know much about egg
files, but I think they're basically just zip
files. Once they're in sys.path
the import mechanism should be able to load them. It looks like this is normally done via .pth
files...
For the package deletion, you could try: ipy -m pip uninstall -y test
so it skips the input prompt (which has issues with encoding).
c:\program files\Ironpython 3.4\Lib\site-packages\test_package-24.3.15.10-py3.4.egg\
ipy -X utf8 pip uninstall test
Lookuperror: unknown encoding: ks_c_5601_1987
* Finally, I already know the command, but I additionally inquire if it can be executed without the following error message
I was suggesting trying the command with the -y
argument: ipy -m pip uninstall -y test
I am always grateful for your kind explanations.
c:\>ipy -X utf8 -m pip list
pip 19.1.1
...
daactor-package 24.3.15.10
./daactor_package-24.3.15.10-py3.4.egg
c:\>ipy -X utf8
>>> ironpython 3.4.1 ... for more information
>>> import daactor #it was good working
>>> sys.path
['.', 'c:\\IronPython 3.4\\', 'c:\\IronPython 3.4\\Lib', 'c:\\IronPython 3.4\\lib\\site-packages\\daactor_package-24.3.15.10-py3.4.egg']
>>> Ironpython 3.4.1 ... for more information
>>> import daactor
ImportError: no module named 'daactor'
>>> sys.path
['.', 'c:\\Ironpython 3.4\\lib', 'c:\\Ironpython 3.4\\Lib\\site-packages', c:\\Ironpython 3.4\\DLLs', 'c:\\Ironpython 3.4']
setup.py
windows 10> cmd
Result
So, I modified code in site.py
It was good working when I added encoding='utf8'
It is possible to set setlocale to utf8 without modifying the library?