I was trying to add some folders to my path, so I added a .pth<\/code> file to my
site-packages<\/code> folder.
When it didn't work (I printed
sys.path<\/code> and it doesn't contain any of the paths I wrote in the file) , I tried to find the
.pth<\/code> file from within python and I noticed that the name of one of the folders in the path contains a
.<\/code>
in it.
or any other suggestions why Its not working?
问题是我用~/
而不是使用完整路径/home/pomicelltohar
在.pth
文件中写入了路径
I have experienced a similar issue where my file contained the correct path but it was not processed. Maybe someone has the same issue. The file was being saved with wierd encoding UTF-16 BOM.
$my_modules_path| Out-File $my_pth_file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.